/* ===== Redwixoft — theme ===== */
:root {
  --bg: #0a0b12;
  --bg-alt: #0e1019;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f6;
  --muted: #a2a7b8;
  --faint: #6b7185;
  --brand: #ff3b4e;
  --brand-2: #ff7a3d;
  --accent: #5b8cff;
  --grad: linear-gradient(120deg, #ff3b4e 0%, #ff7a3d 55%, #ffb03d 100%);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ===== Background decoration ===== */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -1; border-radius: 50%;
  filter: blur(90px); opacity: 0.5; pointer-events: none;
}
.bg-glow--1 { top: -180px; left: -120px; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(255,59,78,0.5), transparent 70%); }
.bg-glow--2 { top: 320px; right: -160px; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(91,140,255,0.4), transparent 70%); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 999px; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  background: var(--grad); color: #150406;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.2s;
  box-shadow: 0 8px 30px -8px rgba(255,59,78,0.55);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgba(255,59,78,0.7); }
.btn--lg { padding: 15px 30px; font-size: 1rem; }
.btn--sm { padding: 9px 18px; font-size: 0.88rem; }
.btn--ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: none;
}
.btn--ghost:hover { background: var(--surface-2); box-shadow: none; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 11, 18, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-family: 'Space Grotesk', sans-serif; }
.brand__name { font-weight: 700; font-size: 1.22rem; letter-spacing: -0.02em; }
.brand__accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.brand__logo {
  position: relative; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; overflow: hidden;
  background: transparent; border: 0;
}
.brand__logo img { width: 100%; height: 100%; object-fit: contain; }
.brand__logo-fallback {
  position: absolute; inset: 0; display: none; place-items: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem;
  color: #150406; background: var(--grad);
}
.brand__logo--fallback .brand__logo-fallback { display: grid; }
.brand__logo--sm { width: 32px; height: 32px; border-radius: 9px; }

.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { color: var(--muted); font-size: 0.94rem; font-weight: 500; transition: color 0.2s; position: relative; }
.nav__links a:hover { color: var(--text); }
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--grad); border-radius: 2px; transition: width 0.25s var(--ease);
}
.nav__links a:hover::after { width: 100%; }
.nav__cta { margin-left: 4px; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; margin-left: auto; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none; flex-direction: column; gap: 4px;
  background: rgba(10,11,18,0.96); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); padding: 8px 24px 18px;
}
.nav__mobile.open { display: flex; }
.nav__mobile a { padding: 12px 4px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); }
.nav__mobile a:last-child { border-bottom: 0; }

/* ===== Pills / eyebrows ===== */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(255,59,78,0.18); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.eyebrow {
  display: inline-block; font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-2); margin-bottom: 14px;
}

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Hero ===== */
.hero { position: relative; padding: 168px 0 90px; }
.hero__inner { display: flex; flex-direction: column; align-items: flex-start; }
.hero__title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05; letter-spacing: -0.03em;
  margin: 22px 0 20px;
}
.hero__sub { font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--muted); max-width: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 0; }

.tech-row { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 54px; padding-top: 34px; border-top: 1px solid var(--border); width: 100%; }
.tech-row li {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.86rem; font-weight: 500; color: var(--muted);
  padding: 7px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
}

/* ===== Sections ===== */
.section { padding: 96px 0; position: relative; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 640px; margin-bottom: 52px; }
.section__title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; line-height: 1.12; }
.section__lead { color: var(--muted); margin-top: 16px; font-size: 1.06rem; }

/* ===== Cards ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); opacity: 0; transition: opacity 0.3s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:hover { transform: translateY(-5px); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card__icon {
  width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255,59,78,0.1); color: var(--brand-2); margin-bottom: 18px;
  border: 1px solid rgba(255,122,61,0.2);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.22rem; font-weight: 600; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* ===== Steps ===== */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; position: relative;
}
.step__num { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: transparent; -webkit-text-stroke: 1.5px rgba(255,122,61,0.55); display: block; margin-bottom: 14px; }
.step h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.14rem; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.94rem; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.about__text p { color: var(--muted); margin-top: 16px; max-width: 520px; }
.checklist { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; color: var(--text); font-weight: 500; }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 16.2l-3.5-3.5L4 14.2l5 5 11-11-1.4-1.4z'/%3E%3C/svg%3E") center/72% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 16.2l-3.5-3.5L4 14.2l5 5 11-11-1.4-1.4z'/%3E%3C/svg%3E") center/72% no-repeat;
}

/* Code window */
.code-window { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #0c0e18; box-shadow: 0 30px 70px -30px rgba(0,0,0,0.8); }
.code-window__bar { display: flex; gap: 8px; padding: 14px 16px; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border); }
.code-window__bar span { width: 12px; height: 12px; border-radius: 50%; background: #3a3f52; }
.code-window__bar span:nth-child(1) { background: #ff5f57; }
.code-window__bar span:nth-child(2) { background: #febc2e; }
.code-window__bar span:nth-child(3) { background: #28c840; }
.code-window__body { padding: 22px 24px; font-family: 'Space Grotesk', ui-monospace, monospace; font-size: 0.95rem; line-height: 1.7; overflow-x: auto; }
.code-window__body code { color: #c8cde0; }
.c-key { color: #ff7a9c; } .c-var { color: #7dd3fc; } .c-prop { color: #ffb86c; } .c-str { color: #9be69b; }
.c-type { color: #c9a2ff; } .c-fn { color: #ffd479; } .c-cmt { color: #5f6577; font-style: italic; }

/* ===== Products ===== */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.product {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.3s var(--ease), border-color 0.3s;
  display: flex; flex-direction: column; align-items: center;
  padding: 34px 26px 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,59,78,0.08), transparent 55%),
    var(--surface);
}
.product:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.product__shot {
  position: relative; width: 220px; max-width: 100%; aspect-ratio: 9 / 19;
  display: grid; place-items: center; border-radius: 26px; overflow: hidden;
  background:
    radial-gradient(circle at 30% 15%, rgba(255,59,78,0.14), transparent 60%),
    radial-gradient(circle at 80% 90%, rgba(91,140,255,0.14), transparent 60%),
    #0c0e18;
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.75);
}
.product__shot img { width: 100%; height: 100%; object-fit: contain; }
.product__shot-ph {
  display: none; font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem; color: var(--faint);
  letter-spacing: 0.02em;
}
.product__shot-ph::before {
  content: ''; display: block; width: 40px; height: 40px; margin: 0 auto 12px; border-radius: 12px;
  background: var(--grad); opacity: 0.85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M21 5H3a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1zM8.5 9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM5 17l4-4 2.5 2.5L15 11l4 6z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M21 5H3a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1zM8.5 9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM5 17l4-4 2.5 2.5L15 11l4 6z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.product__shot.is-empty .product__shot-ph { display: block; text-align: center; }
.product__body { padding-top: 26px; text-align: center; }
.product__tag {
  display: inline-block; font-family: 'Space Grotesk', sans-serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-2);
  padding: 5px 11px; border-radius: 999px; background: rgba(255,122,61,0.1);
  border: 1px solid rgba(255,122,61,0.2); margin-bottom: 12px;
}
.product__body h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.product__body p { color: var(--muted); font-size: 0.98rem; max-width: 340px; margin: 0 auto; }

/* ===== Contact ===== */
.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 32px; align-items: stretch; }
.contact__info { display: flex; flex-direction: column; gap: 16px; }
.contact__item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: border-color 0.25s, background 0.25s;
}
a.contact__item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.contact__ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(91,140,255,0.12); color: var(--accent); border: 1px solid rgba(91,140,255,0.22); }
.contact__ico svg { width: 22px; height: 22px; }
.contact__item small { display: block; color: var(--faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 3px; }
.contact__item > span:last-child { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 1.05rem; }
.contact__btn { margin-top: 6px; align-self: flex-start; }

.contact__map { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); min-height: 340px; }
.contact__map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; filter: grayscale(0.3) contrast(1.05); }
.contact__maplink {
  position: absolute; right: 12px; bottom: 12px; font-size: 0.82rem; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; background: rgba(10,11,18,0.85);
  border: 1px solid var(--border-strong); backdrop-filter: blur(8px); color: var(--text);
  transition: background 0.2s;
}
.contact__maplink:hover { background: rgba(10,11,18,0.98); }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 40px 0; background: var(--bg-alt); }
.footer__inner { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__meta { color: var(--muted); font-size: 0.94rem; }
.footer__meta a { color: var(--brand-2); }
.footer__legal { color: var(--faint); font-size: 0.84rem; }
.footer__copy { color: var(--faint); font-size: 0.86rem; }

/* ===== Reveal animation ===== */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 940px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
}
@media (max-width: 720px) {
  .hero { padding: 132px 0 70px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tech-row { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
