/* ==========================================================================
   Safday — coming soon
   Paper, ink, one ember accent. Fraunces for display, Inter for the rest.
   ========================================================================== */

:root {
  --paper: #f4efe6;
  --ink: #171511;
  --ink-2: #4b4740;
  --ink-3: #6b665a;
  --line: rgba(23, 21, 17, 0.14);
  --line-strong: rgba(23, 21, 17, 0.3);
  --ember: #b8471f;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --dial-size: clamp(8rem, 20vw, 11rem);
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Fine paper grain over everything. Purely decorative; ignores pointer events. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.6;
  background-size: 180px 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.09  0 0 0 0 0.08  0 0 0 0 0.07  0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

h1,
h2,
p {
  margin: 0;
}

::selection {
  background: var(--ember);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.stage {
  display: grid;
  place-items: center;
  padding: clamp(2.5rem, 6vh, 4rem) var(--gutter);
}

.lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

.wordmark {
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  font: 400 clamp(3.75rem, 11vw, 7.5rem) / 0.95 var(--font-display);
  letter-spacing: -0.04em;
}

.tagline {
  margin-top: clamp(0.5rem, 1.5vh, 1rem);
  font: italic 300 clamp(1.25rem, 2.6vw, 1.875rem) / 1.2 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.tagline__mark {
  color: var(--ember);
  font-style: normal;
}

.eyebrow {
  padding-inline-start: 0.18em; /* balances trailing letter-spacing */
  font: 500 0.75rem / 1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   Release block
   -------------------------------------------------------------------------- */

.release {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
}

.release::before {
  content: "";
  width: 1px;
  height: 2rem;
  margin-bottom: 1.25rem;
  background: var(--line-strong);
  transform-origin: top;
  animation: grow 1s var(--ease-out) 0.6s both;
}

.release__date {
  margin-top: 0.75rem;
  font: italic 300 clamp(1.125rem, 2vw, 1.375rem) / 1.2 var(--font-display);
  color: var(--ink-2);
}

.countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem clamp(0.75rem, 4vw, 2.5rem);
  margin-top: clamp(1.25rem, 3vh, 1.75rem);
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.countdown__value {
  min-width: 2ch;
  font: 400 clamp(2rem, 5vw, 3.25rem) / 1 var(--font-display);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.countdown__label {
  padding-inline-start: 0.12em;
  font: 500 0.5625rem / 1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

@media (min-width: 600px) {
  .countdown__label {
    font-size: 0.625rem;
    letter-spacing: 0.14em;
  }
}

/* --------------------------------------------------------------------------
   Progress dial
   -------------------------------------------------------------------------- */

.dial {
  position: relative;
  width: var(--dial-size);
  height: var(--dial-size);
}

.dial__svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 18px 32px rgba(23, 21, 17, 0.14));
}

.dial__face {
  fill: url(#dial-face);
  stroke: var(--line);
  stroke-width: 1;
}

.dial__ticks {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 7;
}

.dial__ticks--major {
  stroke: rgba(23, 21, 17, 0.45);
  stroke-width: 12;
}

.dial__track {
  fill: none;
  stroke: rgba(23, 21, 17, 0.09);
  stroke-width: 10;
}

.dial__arc {
  fill: none;
  stroke: var(--ember);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.8s var(--ease-out);
}

.dial__hand {
  transform-box: view-box;
  transform-origin: center;
  transition: transform 1.8s var(--ease-out);
}

.dial__hand circle {
  fill: var(--ember);
  stroke: var(--paper);
  stroke-width: 3;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: 1.5rem var(--gutter) 2rem;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.site-footer small {
  font-size: inherit;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes grow {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

.reveal {
  animation: rise 0.9s var(--ease-out) both;
}

.reveal[data-delay="1"] { animation-delay: 0.12s; }
.reveal[data-delay="2"] { animation-delay: 0.24s; }
.reveal[data-delay="3"] { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .release::before {
    animation: none;
  }

  .dial__arc,
  .dial__hand {
    transition: none;
  }
}
