/* =============================================================
   Webflow Agency Landing Page V1 — Brix
   Built from the Figma export. Design tokens first, then layout.
   Keep .hp (honeypot) and .form-status regardless of redesigns.
   ============================================================= */

:root {
  --purple: #4a3aff;
  --purple-2: #6c55ff;
  --ink: #211f54;        /* headings */
  --ink-2: #19213d;      /* logo wordmark */
  --muted: #6e7191;      /* body copy */
  --muted-2: #4a4566;    /* input placeholders */
  --line: #eff0f6;       /* footer / hairlines */
  --card-line: #edeef6;  /* feature card border */
  --input-line: #d9dbf0; /* input border */
  --form-line: #d8daf0;  /* form card border */
  --icon: #887eff;       /* label / accent icons */
  --feat-bg: #efeeff;    /* feature icon tile */
  --dark: #0a052b;       /* CTA banner */
  --dot: rgba(239, 238, 255, 0.63);

  --radius-card: 32px;
  --radius-field: 16px;
  --radius-pill: 96px;
  --container: 1140px;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; } /* smooth scroll handled in main.js (rAF) */

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500; /* regular body text is medium; headings/buttons set 700 */
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Balance headings + key marketing paragraphs to avoid orphans (graceful fallback) */
h1, h2, h3,
.hero__lead, .cta__text, .features__sub, .feature-card__text { text-wrap: balance; }
p { text-wrap: pretty; }

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

/* ---- buttons ----------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font: 700 14px/1.25 var(--font);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-2) 100%);
  box-shadow: 0 4px 12px rgba(74, 58, 255, 0.16);
  transition: box-shadow 0.2s ease, opacity 0.15s ease;
  text-decoration: none;
}
.btn:hover { box-shadow: 0 6px 16px rgba(74, 58, 255, 0.26); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* Brix button micro-interaction. .btn__wrap clips overflow; on hover the arrow
   slides OUT of the box and the dot slides IN. Only transforms animate, and the
   dot is absolutely positioned — so the button's size never changes. */
.btn__wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
}
.btn__dot {
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transform: translate(-14px, -50%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease;
}
.btn__text { transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1); }
.btn__icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease;
}
.btn__icon svg { width: 16px; height: 16px; display: block; }
.btn:hover .btn__dot,
.btn:focus-visible .btn__dot { opacity: 1; transform: translate(0, -50%); }
.btn:hover .btn__text,
.btn:focus-visible .btn__text { transform: translateX(14px); }
.btn:hover .btn__icon,
.btn:focus-visible .btn__icon { opacity: 0; transform: translateX(20px); }

/* ---- logo -------------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 9px; }
.logo__word { font-size: 24px; font-weight: 700; color: var(--ink-2); letter-spacing: -0.01em; }

/* =============================================================
   HERO
   ============================================================= */
.hero { position: relative; overflow: hidden; padding-bottom: 24px; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, var(--dot) 1.4px, transparent 1.6px);
  background-size: 22px 22px;
  pointer-events: none;
}
.hero__glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: -360px;
  width: 1100px;
  height: 680px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(74, 58, 255, 0.22), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
  /* Hero content is a narrower block than the banner below (matches Figma). */
  max-width: 960px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 446px;
  gap: 48px;
  align-items: start;
  padding-top: 56px;
}

.hero__intro { padding-top: 28px; }
.hero__title {
  margin: 18px 0 8px;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.hero__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 46ch;
}

.hero__features { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; }
.hero__features .hf { display: inline-flex; align-items: center; gap: 14px; }
.hero__features .hf svg,
.hero__features .hf img { width: 20px; height: 20px; color: var(--icon); flex: none; }
.hero__features .hf span { font-size: 16px; font-weight: 700; color: var(--ink); }
.hero__features p { margin: 0 0 0 34px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.hero__features .hf { line-height: 1.1; }

/* =============================================================
   FORM CARD
   ============================================================= */
.form {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #f9f7ff 0%, #fff 28%, #fff 100%);
  border: 1px solid var(--form-line);
  border-radius: var(--radius-card);
  box-shadow: 0 6px 20px rgba(20, 20, 42, 0.06);
  padding: 30px 32px;
}
.form__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 16px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field--wide { grid-column: 1 / -1; }

.field__label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.field__label svg,
.field__label img { width: 18px; height: 18px; color: var(--icon); flex: none; }

.field input,
.field textarea {
  width: 100%;
  font: 500 13px/1.3 var(--font);
  color: var(--ink);
  padding: 12px 16px;
  border: 1px solid var(--input-line);
  border-radius: var(--radius-field);
  background: linear-gradient(180deg, #fff 0%, #fbfbff 100%);
  box-shadow: inset 0 3.6px 3.6px rgba(255, 255, 255, 0.67), 0 1.5px 5px rgba(228, 229, 248, 0.25), 0 1px 2px rgba(19, 24, 78, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input { height: 44px; }
.field textarea { min-height: 110px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:hover:not(:focus),
.field textarea:hover:not(:focus) {
  border-color: #aaa4ef;
  box-shadow: inset 0 3.6px 3.6px rgba(255, 255, 255, 0.67), 0 2px 10px rgba(74, 58, 255, 0.1);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.14);
}

.form__submit { margin-top: 20px; }

.form-status:empty { display: none; }
.form-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 0;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #d61f69;
  background: linear-gradient(180deg, #fff5f9 0%, #fdeaf2 100%);
  border: 1px solid #f6cfdf;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(214, 31, 105, 0.08);
  animation: form-status-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.form-status::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--form-status-icon) center / contain no-repeat;
  mask: var(--form-status-icon) center / contain no-repeat;
  --form-status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5'/%3E%3Cpath d='M12 16.2h.01'/%3E%3C/svg%3E");
}
.form-status--ok {
  color: #18794e;
  background: linear-gradient(180deg, #f1fbf5 0%, #e7f7ee 100%);
  border-color: #c3ead2;
  box-shadow: 0 4px 14px rgba(24, 121, 78, 0.08);
}
.form-status--ok::before {
  --form-status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8.5 12.2l2.4 2.4 4.6-4.8'/%3E%3C/svg%3E");
}
@keyframes form-status-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .form-status { animation: none; }
}

/* honeypot: present in DOM, hidden from humans + AT */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* =============================================================
   CTA BANNER (dark)
   ============================================================= */
/* z-index 0 keeps the banner *below* the hero/form (which sit at z-index 1),
   so the form card floats on top of the banner in the overlap zone. */
.cta { position: relative; z-index: 0; }
.cta__panel {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  border-radius: var(--radius-card);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  min-height: 420px;
}
.cta__panel > * { min-width: 0; }
.cta__body { padding: 56px 64px; max-width: 420px; }
.cta__title { margin: 0 0 12px; font-size: 28px; line-height: 1.25; font-weight: 700; color: #fff; }
.cta__text { margin: 0 0 24px; font-size: 14px; line-height: 1.45; color: var(--line); }
.cta__art {
  align-self: stretch;
  display: block;
  width: 100%;
  min-height: 0;
}
.cta__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* =============================================================
   FEATURES
   ============================================================= */
.features { padding: 72px 0 80px; }
.features__head { max-width: 460px; margin: 0 auto 24px; text-align: center; }
.features__title { margin: 0 0 6px; font-size: 26px; line-height: 1.25; font-weight: 700; color: var(--ink); }
.features__sub { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

.features__grid {
  max-width: 916px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(20, 20, 42, 0.03);
}
.feature-card__icon { flex: none; width: 72px; height: 72px; }
.feature-card__icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.feature-card__title { margin: 2px 0 4px; font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.feature-card__text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

.features__cta { display: flex; justify-content: center; margin-top: 32px; }

/* =============================================================
   FOOTER
   ============================================================= */
.footer { border-top: 1px solid var(--line); }
.footer__inner { padding: 26px 24px; text-align: center; }
.footer p { margin: 0; font-size: 16px; color: var(--muted); }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (min-width: 992px) {
  /* gentle overlap: form floats over the dark banner, as in the design */
  .cta { margin-top: -56px; }
}

@media (max-width: 991px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .hero__intro { padding-top: 0; }
  .hero__title { max-width: none; }
  /* Mobile CTA: centered single column — title, then the W, then text, then button.
     display:contents flattens .cta__body so its children can be ordered with the art. */
  .cta__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 44px 28px;
    min-height: 0;
  }
  .cta__body { display: contents; }
  .cta__title { order: 1; margin: 0; }
  .cta__art { order: 2; align-self: stretch; height: auto; margin: 16px 0; }
  .cta__art img { height: auto; object-fit: contain; }
  .cta__text { order: 3; margin: 0 0 24px; max-width: 42ch; }
  .cta__panel .btn { order: 4; }
}

@media (max-width: 640px) {
  /* smaller radii on mobile (everything is smaller); buttons keep their pill */
  :root { --radius-card: 18px; --radius-field: 12px; }
  .hero__title { font-size: 24px; }
  .hero__features { margin-top: 16px; }
  .hero__features .hf img { width: 18px; height: 18px; }
  .hero__features p { margin-top: -3px; }
  .hero__glow { top: -480px; opacity: 0.6; }
  .cta__title { font-size: 22px; }
  .features__title { font-size: 22px; }
  .feature-card__title { font-size: 16px; }
  .feature-card__icon { width: 56px; height: 56px; }
  /* smaller buttons on mobile */
  .btn { padding: 10px 18px; font-size: 13px; }
  /* lighter shadows on mobile — they read too heavy at small sizes */
  .form { padding: 24px 20px; box-shadow: 0 3px 12px rgba(20, 20, 42, 0.05); }
  .field input, .field textarea {
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(19, 24, 78, 0.05);
  }
  .form__fields { grid-template-columns: 1fr; }
  .features { padding: 48px 0 56px; }
  /* 2 columns on phones; icon stacked on top of the text */
  .features__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feature-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(20, 20, 42, 0.03);
  }
  .footer p { font-size: 14px; }
}

/* very narrow phones: drop the feature grid to a single column */
@media (max-width: 360px) {
  .features__grid { grid-template-columns: 1fr; }
}

/* =============================================================
   SCROLL REVEAL (blur-in)
   Hidden state applies only when JS is active (.js on <html>),
   so no-JS users always see content. main.js adds .is-visible.
   ============================================================= */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(10px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform, filter;
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  /* never leave content hidden for reduced-motion users */
  .js [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
}
