/* ==========================================================================
   Omniwatt — landing page
   Palette: navy #151222 · beige #E9E5D9 · red #FF3924 · white #FFFFFF
   ========================================================================== */

:root {
  --navy: #151222;
  --beige: #E9E5D9;
  --red: #FF3924;
  --white: #FFFFFF;

  --line-on-dark: rgba(233, 229, 217, 0.16);
  --line-on-light: rgba(21, 18, 34, 0.14);

  --font: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.7s;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--navy);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }

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

::selection { background: var(--red); color: var(--white); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Italic emphasis used throughout */
.em-serif {
  font-family: var(--font);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.005em;
}

.accent-red { color: var(--red); }

.underline-red {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 0.055em;
  text-underline-offset: 0.13em;
  text-decoration-skip-ink: none;
}

/* Forced line break, suppressed on narrow screens (see Responsive) */
.line-break { display: inline; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(21, 18, 34, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-on-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--beige);
}

/* Logo lockup — mark + wordmark, beige on navy */
.brand-logo {
  display: block;
  height: 2.4rem;
  width: auto;
  flex: none;
  transition: opacity 0.3s ease;
}

.brand:hover .brand-logo,
.brand:focus-visible .brand-logo { opacity: 0.75; }

.brand-logo-footer { height: 2rem; }

.site-nav {
  display: flex;
  gap: 2.25rem;
  margin-left: auto;
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 450;
  letter-spacing: 0.02em;
  color: var(--beige);
  transition: color 0.25s ease;
  padding-block: 0.25rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible { color: var(--white); }

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.72rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.btn:active { transform: scale(0.97); }

.btn-outline {
  border-color: rgba(233, 229, 217, 0.35);
  color: var(--beige);
}

.btn-outline:hover {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--navy);
  color: var(--beige);
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-fade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 30% 45%, rgba(21, 18, 34, 0) 0%, rgba(21, 18, 34, 0.55) 100%),
    linear-gradient(to bottom, rgba(21, 18, 34, 0.35), rgba(21, 18, 34, 0) 30%, rgba(21, 18, 34, 0) 70%, var(--navy));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 9rem 6rem;
}

.hero-title {
  font-size: clamp(2.7rem, 6.2vw, 5.2rem);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: var(--white);
  max-width: 26ch;
}

.hero-title .em-serif,
.hero-title em {
  font-family: var(--font);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-line-dim { color: var(--beige); }
.hero-line-bright { color: var(--white); }

/* Room below the baseline so the mask reveal doesn't clip the underline */
.hero-title .hero-line {
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
}

.hero-title .hero-line-inner { transform: translateY(145%); }

.hero-sub {
  margin-top: 2.25rem;
  max-width: 40rem;
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  line-height: 1.65;
  color: var(--beige);
}

/* Staged mask reveal on load */
.hero-line {
  display: block;
  overflow: hidden;
}

.hero-line-inner {
  display: block;
  transform: translateY(110%);
  opacity: 0;
}

.is-loaded .hero-line-inner {
  animation: hero-rise 0.9s var(--ease-out) forwards;
}

.is-loaded .hero-title .hero-line:nth-child(1) .hero-line-inner { animation-delay: 0.15s; }
.is-loaded .hero-title .hero-line:nth-child(2) .hero-line-inner { animation-delay: 0.3s; }
.is-loaded .hero-sub .hero-line-inner { animation-delay: 0.5s; }

@keyframes hero-rise {
  to { transform: translateY(0); opacity: 1; }
}

.scroll-cue {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 2rem;
  height: 4.5rem;
  display: flex;
  justify-content: center;
}

.scroll-cue-line {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(233, 229, 217, 0.5));
  position: relative;
  overflow: hidden;
}

.scroll-cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: var(--red);
  animation: cue-drop 2.4s ease-in-out infinite;
}

@keyframes cue-drop {
  0% { top: -40%; }
  60%, 100% { top: 110%; }
}

/* ==========================================================================
   Shared section chrome
   ========================================================================== */

.section-light { background: var(--beige); color: var(--navy); }
.section-dark { background: var(--navy); color: var(--beige); }

.section-head { margin-bottom: clamp(3rem, 6vw, 5rem); }

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 26ch;
}

.section-dark .section-title { color: var(--white); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   2 · Thesis
   ========================================================================== */

.thesis { padding-block: clamp(5rem, 10vw, 8.5rem); }

.thesis-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.thesis-item {
  display: grid;
  grid-template-columns: minmax(4.5rem, 1fr) minmax(0, 3.2fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2.25rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line-on-light);
}

.thesis-item:last-child { border-bottom: 1px solid var(--line-on-light); }

.thesis-num {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--red);
  line-height: 1.4;
  transition: transform 0.5s var(--ease-out);
}

.thesis-item:hover .thesis-num { transform: translateX(6px); }

.thesis-title {
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.008em;
  line-height: 1.25;
  margin-bottom: 0.9rem;
}

.thesis-body p {
  max-width: 56ch;
  color: rgba(21, 18, 34, 0.78);
}

.thesis-body .em-serif {
  color: var(--navy);
  font-size: 1.08em;
}

/* Staggered reveal of the three items */
.thesis-item.reveal { transition-delay: 0.05s; }
.thesis-item.reveal:nth-child(2) { transition-delay: 0.15s; }
.thesis-item.reveal:nth-child(3) { transition-delay: 0.25s; }

/* ==========================================================================
   3 · Our Answer
   ========================================================================== */

.answer { padding-block: clamp(5rem, 10vw, 8.5rem); }

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.answer-card {
  --card-pad: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  padding: var(--card-pad);
  border: 1px solid var(--line-on-dark);
  border-radius: 14px;
  background: rgba(233, 229, 217, 0.025);
  transition: border-color 0.4s ease, background-color 0.4s ease, transform 0.4s var(--ease-out);
}

.answer-card:hover {
  border-color: rgba(255, 57, 36, 0.55);
  background: rgba(233, 229, 217, 0.05);
  transform: translateY(-4px);
}

.answer-card.reveal:nth-child(2) { transition-delay: 0.1s; }
.answer-card.reveal:nth-child(3) { transition-delay: 0.1s; }
.answer-card.reveal:nth-child(4) { transition-delay: 0.2s; }

/* Full-bleed banner: cancels the card padding, clips to the top corners */
.answer-media {
  position: relative;
  flex: none;
  aspect-ratio: 16 / 10;
  margin: calc(var(--card-pad) * -1);
  margin-bottom: clamp(1.5rem, 2.5vw, 2rem);
  border-radius: 13px 13px 0 0;
  overflow: hidden;
  background: rgba(21, 18, 34, 0.6);
}

.answer-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.9);
  transition: transform 0.6s var(--ease-out), filter 0.4s ease;
}

/* Settle the image into the card rather than ending on a hard edge */
.answer-media::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(21, 18, 34, 0), var(--navy));
  pointer-events: none;
}

.answer-card:hover .answer-media img {
  transform: scale(1.04);
  filter: saturate(1) brightness(1);
}

.answer-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--red);
  letter-spacing: 0.08em;
}

.answer-name {
  margin-top: 1.1rem;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--white);
}

.answer-lede {
  margin-top: 0.7rem;
  color: var(--beige);
  max-width: 44ch;
}

.answer-divider {
  height: 1px;
  background: var(--line-on-dark);
  margin-block: 1.6rem;
  position: relative;
  overflow: hidden;
}

.answer-divider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.answer-card:hover .answer-divider::after { transform: scaleX(1); }

.answer-vignette {
  color: rgba(233, 229, 217, 0.78);
  font-size: 0.98rem;
  line-height: 1.7;
}

.answer-vignette .em-serif {
  display: block;
  color: var(--beige);
  font-size: 1.28em;
  line-height: 1.4;
  margin-bottom: 0.55rem;
}

/* ==========================================================================
   4 · Who We Are
   ========================================================================== */

.company { padding-block: clamp(5rem, 10vw, 8.5rem); }

.company-lede {
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.6;
  max-width: 58ch;
  color: rgba(21, 18, 34, 0.82);
}

.pillars {
  margin-top: clamp(3.5rem, 6vw, 5.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.pillar {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-on-light);
  position: relative;
}

/* Hover: the red rule runs the full width, the text steps in and sharpens */
.pillar::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease-out);
}

.pillar:hover::after { transform: scaleX(1); }

.pillar-mark {
  position: absolute;
  top: -1px;
  left: 0;
  width: 3rem;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out) 0.25s;
}

.pillar.is-visible .pillar-mark { transform: scaleX(1); }

.pillar.reveal:nth-child(2) { transition-delay: 0.12s; }
.pillar.reveal:nth-child(2) .pillar-mark { transition-delay: 0.37s; }
.pillar.reveal:nth-child(3) { transition-delay: 0.24s; }
.pillar.reveal:nth-child(3) .pillar-mark { transition-delay: 0.49s; }

.pillar-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 0.5rem;
}

.pillar p {
  color: rgba(21, 18, 34, 0.72);
  font-size: 0.98rem;
  max-width: 30ch;
}

.pillar-title,
.pillar p {
  transition: transform 0.45s var(--ease-out), color 0.35s ease;
}

.pillar:hover .pillar-title,
.pillar:hover p { transform: translateX(5px); }

.pillar:hover p { color: var(--navy); }

/* ==========================================================================
   5 · Closing
   ========================================================================== */

.closing {
  padding-block: clamp(6.5rem, 13vw, 11rem);
  position: relative;
  overflow: hidden;
}

.closing::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background: radial-gradient(ellipse 55% 60% at 50% 110%, rgba(255, 57, 36, 0.13), transparent 70%);
  pointer-events: none;
}

.closing-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing-title {
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.012em;
  color: var(--white);
  max-width: 24ch;
}

.closing-sub {
  margin-top: 1.75rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--beige);
}

.closing-sub.reveal { transition-delay: 0.12s; }
.closing-inner > .reveal:last-child { transition-delay: 0.24s; }

.email-cta {
  display: inline-flex;
  align-items: baseline;
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  color: var(--beige);
  transition: color 0.3s ease;
}

.email-bracket {
  color: var(--red);
  transition: transform 0.35s var(--ease-out);
}

.email-text {
  margin-inline: 0.6em;
  position: relative;
}

.email-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2em;
  width: 100%;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.email-cta:hover { color: var(--white); }
.email-cta:hover .email-text::after { transform: scaleX(1); }
.email-cta:hover .email-bracket:first-child { transform: translateX(-0.35em); }
.email-cta:hover .email-bracket:last-child { transform: translateX(0.35em); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--navy);
  color: var(--beige);
  border-top: 1px solid var(--line-on-dark);
  padding-block: 2.25rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-footer { color: var(--beige); }

.footer-note {
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .answer-grid { grid-template-columns: 1fr; }
  .answer-card.reveal:nth-child(n) { transition-delay: 0s; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }

  /* Let the hero set its own breaks — forced ones only help wide screens */
  .line-break { display: none; }

  .thesis-item {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .pillars { grid-template-columns: 1fr; }

  .hero-inner { padding-block: 8rem 5.5rem; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-line-inner,
  .hero-title .hero-line-inner {
    transform: none;
    opacity: 1;
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pillar-mark { transform: scaleX(1); transition: none; }

  .answer-media img { transition: none; }
  .answer-card:hover .answer-media img { transform: none; }

  .scroll-cue-line::after { animation: none; }

  .hero-canvas { display: none; }
}
