/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --bg:        #ffffff;
  --surface:   #f5f5f3;
  --accent:    #8b7355;
  --accent-dim:#b8a898;
  --text:      #1a1814;
  --text-dim:  #8a8480;
  --font-serif:    'Cormorant Garamond', Georgia, serif;
  --font-sans:     'Jost', sans-serif;
  --font-display:  'Montserrat', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ── Grain overlay ─────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 100;
  opacity: 0.15;
}

/* ── Stage ─────────────────────────────────────────────────────── */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 3.5rem;
  padding: 2rem;
  animation: stage-in 1.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes stage-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo wrap ─────────────────────────────────────────────────── */
.logo-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Orbital rings */
.logo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent-dim);
  animation: ring-breathe 6s ease-in-out infinite;
}

.ring-outer {
  width: 152px;
  height: 152px;
  opacity: 0.18;
  animation-delay: 0s;
}

.ring-middle {
  width: 120px;
  height: 120px;
  opacity: 0.12;
  animation-delay: -2s;
}

@keyframes ring-breathe {
  0%, 100% { transform: scale(1);    opacity: 0.18; }
  50%       { transform: scale(1.04); opacity: 0.06; }
}

/* SVG mark / image logo */
.logo-mark {
  width: 88px;
  height: 88px;
  position: relative;
  z-index: 1;
  animation: mark-float 8s ease-in-out infinite;
  object-fit: contain;
}

@keyframes mark-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-4px) rotate(0.5deg); }
  66%       { transform: translateY(2px) rotate(-0.3deg); }
}

/* Individual SVG element animations */
.hex-outer {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw-in 2.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards,
             hex-pulse 8s ease-in-out 2.7s infinite;
}

@keyframes draw-in {
  to { stroke-dashoffset: 0; }
}

@keyframes hex-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.square-inner {
  stroke-dasharray: 192;
  stroke-dashoffset: 192;
  animation: draw-in 2s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards,
             square-spin 28s linear 2.8s infinite;
  transform-origin: 60px 60px;
}

@keyframes square-spin {
  from { transform: rotate(45deg); }
  to   { transform: rotate(405deg); }
}

.cross-v,
.cross-h {
  opacity: 0;
  animation: cross-appear 0.8s ease 1.6s forwards;
}

.cross-h { animation-delay: 1.8s; }

@keyframes cross-appear {
  from { opacity: 0; }
  to   { opacity: 0.6; }
}

.center-dot {
  opacity: 0;
  animation: dot-appear 0.6s ease 2s forwards,
             dot-pulse 4s ease-in-out 2.6s infinite;
  transform-origin: 60px 60px;
}

@keyframes dot-appear {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.5; }
}

/* ── Text block ────────────────────────────────────────────────── */
.text-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  text-align: center;
}

.slogan {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(1.3rem, 3.5vw, 2.2rem);
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1.2;
  opacity: 0;
  animation: text-rise 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

@keyframes text-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Thin rule above email */
.text-block::after {
  content: '';
  display: block;
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--accent-dim), transparent);
  opacity: 0;
  animation: rule-in 0.8s ease 1.6s forwards;
}

@keyframes rule-in {
  from { opacity: 0; }
  to   { opacity: 0.5; }
}

.email {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: clamp(0.7rem, 1.8vw, 0.85rem);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.4s ease, letter-spacing 0.4s ease;
  opacity: 0;
  animation: text-rise 1s ease 1.8s forwards;
}

.email:hover {
  color: var(--accent);
  letter-spacing: 0.24em;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .logo-wrap { width: 130px; height: 130px; }
  .ring-outer { width: 126px; height: 126px; }
  .ring-middle { width: 98px; height: 98px; }
  .logo-mark { width: 72px; height: 72px; }
  .stage { gap: 2.8rem; }
}
