/* ------------------------------------------------------------------
   IntelEstate.ai — tokens, layout, motion
   Tokens copied from mercury-15074/src/styles.css
------------------------------------------------------------------- */

:root {
  --bg:         oklch(0.98 0.008 220);   /* warm light gray */
  --fg:         oklch(0.22 0.04 240);    /* bayou navy */
  --primary:    oklch(0.32 0.06 240);    /* slate blue */
  --primary-fg: oklch(0.98 0.01 220);
  --accent:     oklch(0.7 0.11 200);     /* lake-water teal */
  --muted-fg:   oklch(0.5 0.03 230);
  --border:     oklch(0.9 0.018 220);
  --card:       oklch(1 0 0);
  --secondary:  oklch(0.94 0.02 220);
  --radius:     0.5rem;

  --font-serif: "Instrument Serif", Georgia, serif;
  --font-sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease:   cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --nav-h:  56px;
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; }
p   { margin: 0; }

h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

em { color: var(--accent); font-style: normal; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted-fg);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.wrap { max-width: 72rem; margin-inline: auto; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: var(--gutter);
  background: color-mix(in oklch, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  text-decoration: none;
}

.mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in oklch, var(--accent) 8%, transparent);
  color: var(--primary);
}
.mark svg { width: 20px; height: 20px; }

.wordmark {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  grid-template-columns: 52fr 48fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3rem, 8vh, 6rem) var(--gutter) clamp(3rem, 8vh, 6rem);
}

/* ambient light field */
.ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent);
  mask-image: linear-gradient(to bottom, black 60%, transparent);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.blob--accent {
  width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px;
  left: -18vw; top: -22vh;
  background: var(--accent);
  opacity: 0.24;
  animation: drift-a 22s ease-in-out infinite alternate;
}
.blob--primary {
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  right: -20vw; bottom: -30vh;
  background: var(--primary);
  opacity: 0.10;
  animation: drift-b 30s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(14vw, 12vh) scale(1.1); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.05); }
  to   { transform: translate(-12vw, -10vh) scale(1); }
}

/* watermark house behind the headline */
.house--watermark {
  position: absolute;
  z-index: -1;
  width: clamp(240px, 32vw, 420px);
  height: auto;
  left: calc(var(--gutter) - 3vw);
  top: 50%;
  transform: translateY(-52%);
  color: var(--accent);
  opacity: 0.10;
  pointer-events: none;
}

.hero-text {
  position: relative;
  max-width: 36rem;
}
.hero-text .eyebrow { margin-bottom: 1.5rem; }

h1 {
  font-size: clamp(2.4rem, 1.1rem + 3.7vw, 4.6rem);
  margin-bottom: 1.5rem;
}
h1 .line { display: block; }

/* the rotor: one phrase visible, the next rolls up from below */
.rotor {
  position: relative;
  display: inline-grid;
  vertical-align: top;
  white-space: nowrap;
}
.rotor-item {
  grid-area: 1 / 1;
  display: block;
}
.js .rotor-item {
  transition: opacity 600ms var(--ease), transform 600ms var(--ease), filter 600ms var(--ease);
}
.js .rotor-item.is-next {
  opacity: 0;
  transform: translateY(0.45em);
  filter: blur(6px);
}
.js .rotor-item.is-current {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
.js .rotor-item.is-leaving {
  opacity: 0;
  transform: translateY(-0.45em);
  filter: blur(6px);
}

.lede {
  color: var(--muted-fg);
  max-width: 30em;
}

.hero-photo {
  margin: 0;
  margin-right: calc(-1 * var(--gutter));
}

.photo-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--secondary);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, oklch(0.22 0.04 240 / 0.62), oklch(0.22 0.04 240 / 0) 48%);
  pointer-events: none;
}
.photo-frame figcaption {
  position: absolute;
  left: 1.25rem;
  bottom: 1.1rem;
  z-index: 1;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-fg);
}

/* ---------- load choreography ---------- */

.hero-text > * {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 600ms var(--ease) forwards;
}
.hero-text > :nth-child(1) { animation-delay: 0ms; }
.hero-text > :nth-child(2) { animation-delay: 120ms; }
.hero-text > :nth-child(3) { animation-delay: 240ms; }

.hero-photo {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 600ms var(--ease) 200ms forwards;
}
.photo-frame {
  clip-path: inset(0 0 100% 0);
  animation: unveil 900ms var(--ease) 200ms forwards;
}
@keyframes rise   { to { opacity: 1; transform: none; } }
@keyframes unveil { to { clip-path: inset(0 0 0 0); } }

/* the house draws itself */
.house--nav path,
.house--watermark path {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: draw 900ms var(--ease) forwards;
}
.house--watermark path {
  animation-duration: 1400ms;
  animation-delay: 100ms;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- scroll reveals ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: calc(var(--i, 0) * 120ms);
}
.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---------- one-liners ---------- */

.lines {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(4rem, 10vw, 8rem);
}

.line-item {
  position: relative;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 1rem + 2vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-wrap: balance;
  max-width: 24em;
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--border);
}

/* an accent hairline grows in along the top rule as each line reveals */
.line-item::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 4rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 900ms var(--ease);
  transition-delay: calc(var(--i, 0) * 120ms + 200ms);
}
.line-item.in::before,
html:not(.js) .line-item::before { transform: scaleX(1); }

/* ---------- footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1.75rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted-fg);
}
.house--footer {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.footer .tagline { margin-left: auto; }

/* ---------- contact ---------- */

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in oklch, var(--accent) 10%, transparent);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 200ms var(--ease), border-color 200ms var(--ease);
}
.contact-btn:hover {
  background: color-mix(in oklch, var(--accent) 22%, transparent);
  border-color: var(--accent);
}

.footer-contact {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.footer-contact:hover {
  color: var(--primary);
  border-color: var(--accent);
}

/* ---------- responsive ---------- */

@media (max-width: 1023px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    align-items: start;
    padding-top: clamp(2.5rem, 6vh, 4rem);
    padding-bottom: clamp(2rem, 5vh, 3.5rem);
    gap: clamp(1.75rem, 4vh, 3rem);
  }
  .lines {
    padding-top: clamp(1.5rem, 4vw, 3rem);
    padding-bottom: clamp(2.5rem, 6vw, 4rem);
  }
  .hero-photo { margin-right: 0; }
  .house--watermark { top: 2rem; transform: none; }
  .photo-frame {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
  }
}

@media (max-width: 639px) {
  .line-item { padding: 1.1rem 0; }
  .photo-frame { aspect-ratio: 4 / 3; }
  .photo-frame figcaption { font-size: 0.62rem; letter-spacing: 0.12em; left: 1rem; bottom: 0.9rem; }
  .footer .tagline { margin-left: 0; flex-basis: 100%; }
}

@media (max-width: 479px) {
  .wordmark { display: none; }
}

@media (max-width: 359px) {
  h1 { font-size: 2.1rem; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero-text > *, .hero-photo, .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .photo-frame { clip-path: none; }
  .house--nav path, .house--watermark path { stroke-dashoffset: 0; }
  .line-item::before { transform: scaleX(1); }
  .js .rotor-item { opacity: 1; transform: none; filter: none; }
}

