/* =============================================================================
   Home — index.html specific styles
   Extends Prism. Covers the ambient video backdrop, hero, products grid,
   principles, letter, and newsletter sections.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Ambient video backdrop — scroll-scrubbed, fixed behind content
   ----------------------------------------------------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
}

.ambient__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.6;
  will-change: opacity;
}

@media (prefers-reduced-motion: reduce) {
  .ambient__video { display: none; }
  .ambient {
    background-image: url("../Assets/IdleLight-Prism-poster.jpg");
    background-size: cover;
    background-position: center;
  }
}

/* -----------------------------------------------------------------------------
   Hero
   ----------------------------------------------------------------------------- */

.hero {
  padding: clamp(var(--space-5xl), 16vh, var(--space-6xl)) 0 var(--space-5xl);
  position: relative;
}

.hero__kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-whisper);
  margin-bottom: var(--space-xl);
}

.js-ready .hero__kicker {
  animation: slideUp 0.8s var(--ease-out) 0.1s both;
}

.hero__kicker::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: var(--space-md);
  transform: translateY(-2px);
}

.hero__statement {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(32px, 6.4vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 18ch;
  margin-bottom: var(--space-3xl);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero__statement em {
  font-style: normal;
  font-weight: 900;
}

.hero__deck {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.6;
  color: var(--text);
  max-width: 52ch;
}

/* Micro-label that sits right-aligned above the rule line */
.hero__tagline {
  display: block;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-whisper);
  text-transform: uppercase;
  margin-top: var(--space-5xl);
  margin-bottom: var(--space-md);
}

/* End-of-hero rule */
.hero__rule {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.js-ready .hero__rule {
  animation: slideUp 0.8s var(--ease-out) 1.6s both;
}

.hero__rule-line {
  flex: 1;
  height: 1px;
  background: var(--text-whisper);
}

.hero__rule-marker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-whisper);
  text-transform: uppercase;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* slideUp: elements stay partially visible during delay (0.4 opacity → 1),
   so they survive screenshots and slow loads before the animation resolves. */
@keyframes slideUp {
  from { opacity: 0.4; transform: translateY(12px); }
  to   { opacity: 1;   transform: translateY(0); }
}

/* -----------------------------------------------------------------------------
   Section — home page layout with grid header
   ----------------------------------------------------------------------------- */

.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section__header {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-xl);
  align-items: baseline;
  margin-bottom: var(--space-4xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.section__number {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-whisper);
  text-transform: uppercase;
}

.section__title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section__title em {
  font-style: italic;
}

/* -----------------------------------------------------------------------------
   Products
   ----------------------------------------------------------------------------- */

.products__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 840px) {
  .products__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.product {
  background: var(--bg);
  padding: var(--space-4xl) var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
}

.product:hover {
  background: var(--bg-tint);
}

.product::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.product:hover::before {
  transform: scaleX(1);
}

.product--lunet {
  --accent:      var(--lunet-blue);
  --accent-tint: var(--lunet-tint);
}

.product--spool {
  --accent:      var(--spool-red);
  --accent-tint: var(--spool-tint);
}

.product__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
}

.product__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product__index {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-whisper);
  text-transform: uppercase;
}

.product__name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
}

.product__mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-tint);
  border-radius: 2px;
  transition: transform 0.4s var(--ease-out);
}

.product:hover .product__mark {
  transform: rotate(-4deg) scale(1.05);
}

.product__mark svg {
  width: 28px;
  height: 28px;
}

.product__description {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 36ch;
  flex: 1;
}

.product__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.product__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.product__status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.product__cta {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: gap 0.3s var(--ease-out);
}

.product__cta:hover {
  gap: var(--space-md);
}

.product__cta--muted {
  color: var(--text-whisper);
  cursor: default;
}

/* -----------------------------------------------------------------------------
   Principles
   ----------------------------------------------------------------------------- */

.principles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.principle {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.principle:first-child {
  padding-top: 0;
}

.principle:last-child {
  border-bottom: none;
}

@media (min-width: 768px) {
  .principle {
    grid-template-columns: 100px 240px 1fr;
    gap: var(--space-2xl);
  }
}

.principle__number {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-whisper);
  text-transform: uppercase;
  padding-top: 6px;
}

.principle__name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
}

.principle__name em {
  font-style: italic;
}

.principle__description {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 54ch;
  grid-column: 2;
}

@media (min-width: 768px) {
  .principle__description {
    grid-column: 3;
  }
}

/* -----------------------------------------------------------------------------
   Letter
   ----------------------------------------------------------------------------- */

.letter {
  max-width: 680px;
  padding-top: var(--space-2xl);
}

.letter__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-whisper);
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
  display: block;
}

.letter__body {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--text);
}

.letter__body p + p {
  margin-top: 1.1em;
}

.letter__body em {
  font-style: italic;
}

.letter__signature {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.letter__sig-mark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 32px;
  line-height: 1;
  color: var(--text);
}

.letter__sig-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.letter__sig-name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.letter__sig-role {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-whisper);
}

/* -----------------------------------------------------------------------------
   Newsletter
   ----------------------------------------------------------------------------- */

.newsletter {
  background: var(--bg-tint);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-5xl) 0;
  margin-top: var(--space-5xl);
}

.newsletter__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 840px) {
  .newsletter__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
  }
}

.newsletter__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-whisper);
  margin-bottom: var(--space-lg);
  display: block;
}

.newsletter__title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.newsletter__title em {
  font-style: italic;
}

.newsletter__description {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 42ch;
}

.newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.newsletter__row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--text);
  padding-bottom: var(--space-sm);
  transition: border-color 0.3s ease;
}

.newsletter__row:focus-within {
  border-color: var(--spool-red);
}

.newsletter__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  padding: var(--space-sm) 0;
}

.newsletter__input::placeholder {
  color: var(--text-whisper);
}

.newsletter__button {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  padding: var(--space-sm) 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: gap 0.3s var(--ease-out);
}

.newsletter__button:hover {
  gap: var(--space-md);
}

.newsletter__note {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-whisper);
  margin-top: var(--space-sm);
}

/* -----------------------------------------------------------------------------
   Responsive — home page
   ----------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .hero { padding: var(--space-4xl) 0 var(--space-3xl); }

  .hero__statement {
    max-width: 100%;
    font-size: clamp(28px, 7.4vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.015em;
    word-spacing: 0.02em;
  }

  .hero__deck { font-size: 15px; }

  .hero__tagline { margin-top: var(--space-3xl); }

  .hero__rule-marker { font-size: 9px; }

  .section { padding: var(--space-4xl) 0; }

  .section__header {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
  }

  .product {
    padding: var(--space-2xl) var(--space-xl);
  }

  .product__name { font-size: 40px; }

  .product__mark { width: 44px; height: 44px; }

  .product__mark svg { width: 22px; height: 22px; }

  .principle {
    grid-template-columns: 1fr;
    padding: var(--space-xl) 0;
  }

  .principle__description {
    grid-column: 1;
    padding-top: var(--space-xs);
  }

  .letter__body { font-size: 17px; }
}
