/* House Twelve — shared styles */

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

:root {
  --night-deep: #0a0e1a;
  --night-mid: #121a2e;
  --night-blue: #1a2744;
  --star-yellow: #ffd97a;
  --star-gold: #ffb347;
  --star-white: #fff8e7;
  --glow-warm: #ffcc66;
  --glow-soft: #ffe4a8;
  --text-dim: #b8c0d4;
  --text-faint: #7a8299;
  --line: rgba(255, 248, 231, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  font-family: 'Lexend Deca', sans-serif;
  font-weight: 300;
  background: var(--night-deep);
  color: var(--star-white);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Deep night sky gradient */
.bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% -20%,
    #1a2744 0%,
    #121a2e 35%,
    #0a0e1a 70%,
    #050608 100%
  );
  z-index: -2;
}

/* Grain texture - very subtle */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Scattered stars */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--star-white);
  opacity: 0.5;
  animation: twinkle 5s ease-in-out infinite;
}

.stars span:nth-child(odd) {
  width: 1px;
  height: 1px;
  animation-duration: 7s;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.6; }
}

/* Layout */
.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
}

/* Header */
header {
  padding: 1.75rem 0;
}

header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--star-white);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--glow-soft);
}

nav {
  display: flex;
  gap: 1.75rem;
}

nav a {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.25s ease;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--star-yellow);
}

/* Sections */
section {
  padding: 3.5rem 0;
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  line-height: 1.25;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--glow-soft);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-dim);
  max-width: 60ch;
}

p strong {
  color: var(--star-white);
  font-weight: 400;
}

a {
  color: var(--star-yellow);
}

a:focus-visible,
.wordmark:focus-visible,
nav a:focus-visible {
  outline: 2px solid var(--star-yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 5rem 0 3.5rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -8rem;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  max-width: 100vw;
  background: radial-gradient(
    circle,
    rgba(255, 204, 102, 0.12) 0%,
    rgba(255, 179, 71, 0.05) 30%,
    transparent 60%
  );
  pointer-events: none;
  z-index: -1;
}

.hero .kicker {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--star-gold);
  margin-bottom: 1rem;
}

/* Rotating word in the hero headline */
.rotator {
  display: inline-grid;
}

.rotator span {
  grid-area: 1 / 1;
  justify-self: start;
  color: var(--glow-soft);
  opacity: 0;
  animation: rotate-word 9s ease-in-out infinite;
}

.rotator span:nth-child(2) {
  animation-delay: 3s;
}

.rotator span:nth-child(3) {
  animation-delay: 6s;
}

@keyframes rotate-word {
  0% { opacity: 0; transform: translateY(0.35em); }
  4%, 29% { opacity: 1; transform: translateY(0); }
  33%, 100% { opacity: 0; transform: translateY(-0.35em); }
}

.hero h1.display {
  font-size: clamp(2.8rem, 11vw, 5.5rem);
  margin-bottom: 1.75rem;
}

.hero .lede {
  font-size: 1.1rem;
  color: var(--text-dim);
}

/* Product card */
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.75rem;
  background: linear-gradient(160deg, rgba(26, 39, 68, 0.45), rgba(18, 26, 46, 0.25));
  margin-top: 1.5rem;
}

.card .status {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--star-yellow);
  border: 1px solid rgba(255, 217, 122, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: 1rem;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  margin-top: 3rem;
}

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

footer p {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin: 0;
}

footer nav {
  gap: 1.25rem;
}

footer nav a {
  font-size: 0.82rem;
}

/* Prose pages (about, contact, privacy) */
.prose h1 {
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
}

.prose ul {
  margin: 0 0 1rem 1.25rem;
  color: var(--text-dim);
}

.prose li {
  margin-bottom: 0.4rem;
}

.updated {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 2rem;
}

@media (max-width: 480px) {
  header .wrap {
    flex-direction: column;
    gap: 0.75rem;
  }

  section {
    padding: 2.5rem 0;
  }

  .hero {
    padding: 3.5rem 0 2.5rem;
  }
}

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

  .stars span {
    animation: none;
  }

  .rotator span {
    animation: none;
  }

  .rotator span:first-child {
    opacity: 1;
  }

  .rotator span:not(:first-child) {
    visibility: hidden;
  }
}
