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

/* ── Tokens ── */
:root {
  --teal:     #0D9394;
  --teal-dim: rgba(13, 147, 148, 0.25);
  --bg:       #F8F6F2;
  --text:     #1A1714;
  --muted:    #9a948e;
  --border:   rgba(26, 23, 20, 0.1);
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─────────────────────────────────────────
   Custom Cursor — desktop/mouse only
───────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  * { cursor: none !important; }

  .cursor {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 99999;
    will-change: left, top;
  }
  .cursor-dot {
    width: 6px; height: 6px;
    background: var(--teal);
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }
  .cursor-ring {
    width: 36px; height: 36px;
    border: 1px solid rgba(13, 147, 148, 0.45);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width .2s ease, height .2s ease, border-color .2s ease;
  }
  .cursor-ring.hovering {
    width: 52px; height: 52px;
    border-color: var(--teal);
  }
}

/* Hide cursor elements on touch */
@media not all and (hover: hover) {
  #cursorRing, #cursorDot { display: none; }
}

/* ─────────────────────────────────────────
   Subtle texture overlay (replaces grain)
───────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%; height: 200%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grain 0.6s steps(4) infinite;
}
@keyframes grain {
  0%   { transform: translate(0,    0);    }
  25%  { transform: translate(-3%,  3%);   }
  50%  { transform: translate(3%,  -2%);   }
  75%  { transform: translate(-2%, -3%);   }
  100% { transform: translate(2%,   1%);   }
}

/* ─────────────────────────────────────────
   Decorative corner mark (replaces orbs)
───────────────────────────────────────── */
.corner-mark {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}
.corner-mark-tl {
  top: 32px; left: 32px;
  width: 60px; height: 60px;
  border-top: 1px solid var(--teal-dim);
  border-left: 1px solid var(--teal-dim);
  opacity: 0;
  animation: fadeIn 1s ease 2s forwards;
}
.corner-mark-br {
  bottom: 32px; right: 32px;
  width: 60px; height: 60px;
  border-bottom: 1px solid var(--teal-dim);
  border-right: 1px solid var(--teal-dim);
  opacity: 0;
  animation: fadeIn 1s ease 2.1s forwards;
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* ─────────────────────────────────────────
   Layout
───────────────────────────────────────── */
.wrap {
  position: relative;
  z-index: 10;
  max-width: 680px;
  width: 100%;
  padding: 64px 40px;
}

/* ─────────────────────────────────────────
   Logo
───────────────────────────────────────── */
.logo {
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: 52px;
  opacity: 0;
  animation: fadeUp .7s cubic-bezier(.16,1,.3,1) .1s forwards;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* teal-tint the white logo on light bg */
  filter: none;
  opacity: 0.85;
}

/* ─────────────────────────────────────────
   Status pill
───────────────────────────────────────── */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--teal-dim);
  border-radius: 100px;
  padding: 6px 14px;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp .7s cubic-bezier(.16,1,.3,1) .25s forwards;
}
.status-dot {
  width: 6px; height: 6px;
  background: var(--teal);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1);   }
  50%     { opacity: .35; transform: scale(.6); }
}

/* ─────────────────────────────────────────
   Heading
───────────────────────────────────────── */
h1 {
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 28px;
}
h1 .line        { display: block; overflow: hidden; }
h1 .line-inner  {
  display: block;
  opacity: 0;
  transform: translateY(100%);
  animation: revealLine .9s cubic-bezier(.16,1,.3,1) forwards;
}
h1 .line:nth-child(1) .line-inner { animation-delay: .45s; }
h1 .line:nth-child(2) .line-inner { animation-delay: .62s; }
h1 em { font-style: italic; color: var(--teal); }

/* ─────────────────────────────────────────
   Divider
───────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp .7s cubic-bezier(.16,1,.3,1) .9s forwards;
}
.divider-line {
  height: 1px; width: 44px;
  flex-shrink: 0;
  background: linear-gradient(to right, rgba(13,147,148,.4), transparent);
}
.divider-text {
  font-family: 'DM Mono', monospace;
  font-size: .64rem;
  color: var(--muted);
  letter-spacing: .1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─────────────────────────────────────────
   Body text
───────────────────────────────────────── */
.body-text {
  font-size: clamp(1rem, 2.8vw, 1.18rem);
  line-height: 1.75;
  color: #6b6560;
  font-weight: 300;
  max-width: 520px;
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.16,1,.3,1) 1.05s forwards;
}
.body-text strong { color: var(--text); font-weight: 400; }
.body-text .accent { color: var(--teal); font-style: italic; }
.body-text-2 {
  margin-top: 16px;
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.16,1,.3,1) 1.2s forwards;
}

/* ─────────────────────────────────────────
   Button
───────────────────────────────────────── */
.actions {
  margin-top: 44px;
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.16,1,.3,1) 1.35s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  font-size: .78rem;
  letter-spacing: .06em;
  font-weight: 400;
  text-decoration: none;
  border: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background .22s ease, box-shadow .22s ease, transform .22s ease;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover {
  background: #0aabad;
  box-shadow: 0 4px 24px rgba(13,147,148,.22);
  transform: translateY(-2px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}
.btn-icon {
  width: 17px; height: 17px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   Fallback
───────────────────────────────────────── */
.fallback {
  margin-top: 18px;
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .05em;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp .7s cubic-bezier(.16,1,.3,1) 1.5s forwards;
}
.fallback a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid var(--teal-dim);
  padding-bottom: 1px;
  transition: border-color .2s ease;
}
.fallback a:hover { border-color: var(--teal); }

/* ─────────────────────────────────────────
   Footer
───────────────────────────────────────── */
footer {
  margin-top: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp .7s cubic-bezier(.16,1,.3,1) 1.65s forwards;
}
.footer-copy {
  font-family: 'DM Mono', monospace;
  font-size: .67rem;
  color: var(--muted);
  letter-spacing: .09em;
  white-space: nowrap;
}
.footer-loc {
  font-family: 'DM Mono', monospace;
  font-size: .63rem;
  color: var(--muted);
  letter-spacing: .04em;
  opacity: .7;
  text-align: right;
}
.footer-loc a {
  color: inherit;
  text-decoration: none;
  transition: opacity .2s;
}
.footer-loc a:hover { opacity: .9; }

/* ─────────────────────────────────────────
   Keyframes
───────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes revealLine {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ─────────────────────────────────────────
   Mobile
───────────────────────────────────────── */
@media (max-width: 600px) {
  .wrap {
    padding: 52px 24px 44px;
    align-self: flex-start;
    margin: auto 0;
  }
  .logo {
    width: 34px; height: 34px;
    margin-bottom: 40px;
  }
  .status {
    margin-bottom: 36px;
    font-size: .62rem;
  }
  .divider-text {
    font-size: .6rem;
  }
  .actions {
    margin-top: 36px;
  }
  .btn {
    width: 100%;
    padding: 16px 20px;
    font-size: .78rem;
  }
  .fallback {
    margin-top: 16px;
    text-align: center;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 48px;
  }
  .footer-loc {
    text-align: left;
    line-height: 1.5;
  }
  .corner-mark { display: none; }
}

@media (max-width: 360px) {
  h1 { font-size: 2.1rem; }
  .divider-text { display: none; }
}
