/* ---------------------------------------------------
   Tokens
--------------------------------------------------- */
:root {
  --bg:        #F5F7F5;
  --grid-line: #DEE6E2;
  --ink:       #17231F;
  --muted:     #5C6864;
  --teal:      #16403E;
  --teal-soft: #2E625F;
  --coral:     #E2785F;

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", "Courier New", monospace;
}

/* ---------------------------------------------------
   Reset
--------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ---------------------------------------------------
   Background: faint dental-chart grid
--------------------------------------------------- */
.chart-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 10%, transparent 75%);
}

/* ---------------------------------------------------
   Stage
--------------------------------------------------- */
.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8vh 1.5rem 6vh;
  max-width: 640px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-soft);
  margin-bottom: 2.25rem;
}

/* ---------------------------------------------------
   Signature element: line-art tooth, self-drawing
--------------------------------------------------- */
.tooth-mark {
  width: 76px;
  height: 90px;
  margin-bottom: 1.75rem;
}

.tooth-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tooth-outline {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw-tooth 1.6s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}

.tooth-shine {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  opacity: 0;
  animation:
    draw-tooth 0.5s ease-out 1.9s forwards,
    fade-in 0.1s linear 1.9s forwards;
}

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

@keyframes fade-in {
  to { opacity: 1; }
}

/* ---------------------------------------------------
   Type
--------------------------------------------------- */
.headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  color: var(--teal);
}

.subline {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 30em;
  margin: 0;
}

/* ---------------------------------------------------
   FDI note — a real nod to dental tooth-numbering
--------------------------------------------------- */
.fdi-note {
  margin-top: 3rem;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--grid-line);
}

.fdi-note span:nth-child(3) {
  color: var(--coral);
  font-size: 0.6rem;
}

/* ---------------------------------------------------
   Footer
--------------------------------------------------- */
.foot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.75rem 1.5rem 2.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.7;
}

/* ---------------------------------------------------
   Motion & accessibility
--------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .tooth-outline,
  .tooth-shine {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* ---------------------------------------------------
   Small screens
--------------------------------------------------- */
@media (max-width: 420px) {
  .stage { padding: 6vh 1.25rem 5vh; }
  .subline { font-size: 0.98rem; }
}
