/* Vocarra — vocarra.co
   Black, bone, nothing else. No gradient, blur, grain, glow or soft edge. */

:root {
  --black: #000000;
  --bone:  #eee8db;
  --quiet: #96928a;   /* bone at ~58% over black, 6.3:1 on #000 */
  --faint: #4a4741;   /* hairline only, never text */

  --font: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Inter, Roboto, Helvetica, Arial, sans-serif;

  --gutter: 24px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--bone);
  font-family: var(--font);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--bone); color: var(--black); }

:focus-visible {
  outline: 1px solid var(--bone);
  outline-offset: 6px;
}

/* ---------------------------------------------------------------- stage */

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(56px, 14vh, 112px) var(--gutter) clamp(40px, 9vh, 72px);
}

.mark {
  width: auto;
  height: clamp(104px, 26vw, 158px);
}

.wordmark {
  margin: clamp(34px, 7vh, 54px) 0 0;
  font-size: clamp(1.375rem, 5.6vw, 2rem);
  font-weight: 300;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.44em;
  text-indent: 0.44em;   /* re-centres against the trailing letter-space */
}

/* A hairline that draws itself once. One pixel, hard ends, no glow. */
.rule {
  display: block;
  width: clamp(30px, 9vw, 46px);
  height: 1px;
  margin: clamp(26px, 5.5vh, 40px) 0;
  background: var(--faint);
}

.line {
  margin: 0;
  max-width: 28ch;
  font-size: clamp(0.8125rem, 3.4vw, 0.9375rem);
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: var(--quiet);
}

.contact {
  margin: clamp(48px, 11vh, 88px) 0 0;
  font-size: clamp(0.875rem, 3.6vw, 1rem);
  letter-spacing: 0.08em;
}

/* The underline is the only thing marking these as links, so it carries
   the 3:1 non-text contrast requirement itself. --faint sits at 2.27:1
   and is for the decorative hairline only. */
.contact a {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--quiet);
  transition: border-color 0.2s linear;
}

.contact a:hover { border-color: var(--bone); }

/* --------------------------------------------------------------- footer */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter) clamp(22px, 4.5vh, 34px);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--quiet);
}

/* Without an underline this link is the same colour as the copyright
   beside it and only its position marks it as a link. */
.foot a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--quiet);
  transition: color 0.2s linear, border-color 0.2s linear;
}

.foot a:hover { color: var(--bone); border-color: var(--bone); }

/* ----------------------------------------------------------- 404 extras */

.notfound .line { letter-spacing: 0.08em; }

/* --------------------------------------------------------------- motion

   Everything above is the resting state and is fully visible on its own.
   The entrance only exists inside the no-preference query, so a browser
   that cannot animate, or a visitor who asked for less motion, simply
   gets the finished page.

   The mark rises from its vertex, the way a voice opens, then holds a
   breath so slow it reads as presence rather than animation. Hard edges
   throughout: a clip wipe, never a fade on the mark itself.             */

@media (prefers-reduced-motion: no-preference) {

  /* ENTRANCE, the original timing. Settled by about 1.95s.
     RESTING STATE picks up at 1.95s: the mark, the hairline and the
     stage share one 9s phase, so they read as a single breath rather
     than three separate animations. */

  .mark {
    animation: rise 1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s both,
               breath 9s ease-in-out 1.95s infinite;
  }

  .rule {
    animation: draw 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 1s both,
               idle 9s ease-in-out 1.95s infinite;
  }

  .wordmark { animation: lift 0.6s ease-out 0.65s both; }
  .line     { animation: lift 0.6s ease-out 1s    both; }
  .contact  { animation: lift 0.6s ease-out 1.2s  both; }
  .foot     { animation: lift 0.6s ease-out 1.35s both; }

  .stage    { animation: drift 9s ease-in-out 1.95s infinite; }
}

/* Both ends must be inset(). Against an implicit to of clip-path:none
   there is nothing to interpolate, so the browser falls back to a
   discrete flip at the halfway mark and the mark pops in. */
@keyframes rise {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes draw { from { transform: scaleX(0); } }
@keyframes lift { from { opacity: 0; transform: translateY(8px); } }

@keyframes breath {
  0%, 100% { transform: scale(1, 1); }
  50%      { transform: scale(0.985, 1.004); }
}

@keyframes idle {
  0%, 100% { transform: scaleX(1); }
  50%      { transform: scaleX(0.58); }
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}

@media (max-width: 380px) {
  :root { --gutter: 20px; }
  .wordmark { letter-spacing: 0.34em; text-indent: 0.34em; }
  .foot {
    flex-direction: column;
    gap: 12px;
    padding-bottom: 30px;
  }
}
