/* WinDoor Santarém — holding page
   Design tokens derived from the Figma brand (indigo/PVC + warm interior light). */

:root {
  --frame:      #4A4E8C;
  --frame-deep: #2E3163;
  --glass:      #EEF1F7;
  --sky:        #C9D3E8;
  --ink:        #1A1B2E;
  --ink-soft:   #4B4F6B;
  --sun:        #F4C15A;
  --sun-deep:   #D69E2E;
  --paper:      #FBFAF6;

  --f-display: "Fraunces", "Times New Roman", serif;
  --f-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 72px);
  --radius: 2px;
}

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

html {
  color-scheme: light;
  background: var(--paper);
}

body {
  font-family: var(--f-body);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(74,78,140,.06), transparent 60%),
    var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 12px;
}
.skip:focus { left: 12px; top: 12px; z-index: 999; }

a { color: inherit; }

/* ── topbar ─────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  max-width: var(--wrap);
  margin: 0 auto;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--frame-deep);
  text-decoration: none;
}
.brand__logo {
  display: block;
  width: clamp(150px, 20vw, 260px);
  height: auto;
}

.topbar__status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 4px rgba(244,193,90,.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(244,193,90,.18); }
  50%      { box-shadow: 0 0 0 8px rgba(244,193,90,.04); }
}

/* ── hero: window as thesis ─────────────────────────── */
.hero {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px var(--gutter) 120px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

/* the window */
.window {
  position: relative;
  aspect-ratio: 800 / 520;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  order: 2;
  box-shadow:
    0 1px 0 rgba(46,49,99,.08),
    0 30px 60px -30px rgba(46,49,99,.28);
}

.window__light {
  position: absolute; inset: 0;
  background:
    radial-gradient(140% 90% at 50% 120%, rgba(244,193,90,.55) 0%, rgba(244,193,90,0) 55%),
    linear-gradient(180deg, #F5F8FC 0%, #E5EAF4 55%, #CFD7E8 100%);
  transform: translateY(30%);
  animation: rise 1.6s cubic-bezier(.2,.7,.2,1) .1s both;
}
@keyframes rise {
  to { transform: translateY(0); }
}
.window__frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.ray {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw 1.4s ease-out 1s forwards;
}
.ray--b { animation-delay: 1.25s; }
@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* copy */
.hero__copy {
  order: 1;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 28px;
  display: inline-flex; align-items: center;
}
.eyebrow__label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--frame);
  padding-left: 14px;
  border-left: 2px solid var(--sun);
}

.headline {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 40;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 28px;
}
.headline__line {
  display: block;
  overflow: hidden;
}
.headline__line > * , .line-1, .line-2 {
  display: inline-block;
  transform: translateY(105%);
  animation: rise-in .9s cubic-bezier(.2,.7,.2,1) forwards;
}
.line-1 { animation-delay: .15s; }
.line-2 { animation-delay: .35s; }
@keyframes rise-in {
  to { transform: translateY(0); }
}

.headline em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--frame);
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 36px;
}
.lede strong {
  color: var(--ink);
  font-weight: 600;
}

/* CTAs */
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 40px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  cursor: pointer;
}
.btn--primary {
  background: var(--frame-deep);
  color: #fff;
}
.btn--primary:hover { background: var(--ink); transform: translateY(-1px); }
.btn--primary:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.btn--ghost {
  background: transparent;
  color: var(--frame-deep);
  border-color: rgba(46,49,99,.22);
}
.btn--ghost:hover { border-color: var(--frame-deep); }

.btn--wide { width: 100%; justify-content: center; padding: 16px 22px; }

/* meta grid */
.meta {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 32px;
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid rgba(46,49,99,.14);
}
.meta > div { min-width: 0; }
.meta dt {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.meta dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.meta a { text-decoration: none; border-bottom: 1px solid var(--sun); }
.meta a:hover { color: var(--frame-deep); }

/* ── quote section ──────────────────────────────────── */
.quote {
  background: var(--frame-deep);
  color: #fff;
  padding: clamp(64px, 10vw, 120px) 0;
  position: relative;
}
.quote::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(244,193,90,.18), transparent 60%),
    linear-gradient(180deg, transparent, rgba(0,0,0,.15));
  pointer-events: none;
}
.quote__inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.quote__head h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.quote__head p {
  color: rgba(255,255,255,.72);
  font-size: 17px;
  margin: 0;
  max-width: 32ch;
}

/* form */
.quote__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field { display: block; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field span {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  padding: 14px 14px;
  transition: border-color .15s ease, background .15s ease;
}
.field input[type="tel"] {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(255,255,255,.4); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sun);
  background: rgba(255,255,255,.04);
}
.quote__form .btn--primary {
  background: var(--sun);
  color: var(--ink);
}
.quote__form .btn--primary:hover {
  background: var(--sun-deep);
  color: var(--ink);
}
.fineprint {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(255,255,255,.5);
}

/* ── footer ─────────────────────────────────────────── */
.foot {
  padding: 56px var(--gutter);
  color: var(--ink-soft);
}
.foot__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.foot__mark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--frame-deep);
  margin: 0;
}
.foot__logo {
  display: block;
  width: clamp(150px, 22vw, 240px);
  height: auto;
}
.foot__line {
  max-width: 52ch;
  margin: 0;
  font-size: 15px;
}
.foot__tiny {
  margin: 8px 0 0;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.foot__tiny a { text-decoration: none; border-bottom: 1px solid var(--sun); color: var(--frame-deep); }

/* ── responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 20px;
    padding-bottom: 80px;
    gap: 40px;
  }
  .window { order: 2; }
  .hero__copy { order: 1; }
  .quote__inner { grid-template-columns: 1fr; }
  .quote__form { grid-template-columns: 1fr; }
  .field--full, .field { grid-column: auto; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .topbar { padding: 18px var(--gutter); }
  .topbar__status { display: none; }
  .brand__logo { width: clamp(140px, 56vw, 220px); }
  .meta { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: stretch; }
  .cta .btn { justify-content: center; }
  .field input[type="tel"] { font-size: 22px; }
  .foot__logo { width: clamp(140px, 58vw, 220px); }
}

/* ── accessibility ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .headline__line > *, .line-1, .line-2 { transform: none; }
  .window__light { transform: none; }
  .ray { stroke-dashoffset: 0; }
}

:focus-visible { outline: 2px solid var(--frame); outline-offset: 2px; border-radius: 2px; }
