@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/CormorantGaramond-Variable.ttf") format("truetype-variations"),
       url("assets/fonts/CormorantGaramond-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-Variable.ttf") format("truetype-variations"),
       url("assets/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --oc-bg: #EEEADE;
  --oc-text: #2A2A28;
  --oc-text-secondary: #8A7A5E;
  --oc-rule: #D6CFBC;
  --oc-accent: #8A6A2F;
  --oc-green: #2F4F3A;
  --oc-serif: "Cormorant Garamond", Georgia, serif;
  --oc-sans: "Inter", Arial, sans-serif;
}

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

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

body {
  min-height: 100dvh;
  background: var(--oc-bg);
  color: var(--oc-text);
  font-family: var(--oc-sans);
  -webkit-font-smoothing: antialiased;
}

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

.frame {
  position: fixed;
  inset: 28px;
  border: 1px solid var(--oc-rule);
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 640px) {
  .frame { inset: 18px; }
}

.stage {
  position: relative;
  height: 100dvh;
  z-index: 2;
}

.top-pos {
  position: absolute;
  left: 50%;
  top: 33%;
  transform: translate(-50%, -50%);
  padding: 0 24px;
}

.top-in {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.threshold-pos {
  position: absolute;
  left: 50%;
  top: 78%;
  transform: translate(-50%, -50%);
  padding: 0 24px;
}

.mark, .rule, .line, .sub-line, .kicker, .threshold, .foot {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.mark { transition-delay: 0ms; }
.rule { transition-delay: 250ms; }
.line { transition-delay: 450ms; }
.sub-line { transition-delay: 650ms; }
.kicker, .threshold { transition-delay: 1000ms; }
.foot { transition-delay: 1200ms; }

body.oc-in .mark,
body.oc-in .rule,
body.oc-in .line,
body.oc-in .sub-line,
body.oc-in .kicker,
body.oc-in .threshold,
body.oc-in .foot {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .mark, .rule, .line, .sub-line, .kicker, .threshold, .foot {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

.mark {
  padding: 18px;
  display: block;
}

.mark img {
  display: block;
  width: 330px;
  height: auto;
}

.rule {
  width: 64px;
  height: 0;
  margin: 40px 0 0;
  border: 0;
  border-top: 1px solid var(--oc-rule);
}

.line {
  margin: 28px 0 0;
  font-family: var(--oc-serif);
  font-weight: 300;
  font-size: 20px;
  letter-spacing: 0.03em;
  color: var(--oc-text);
}

.sub-line {
  margin: 14px 0 0;
  font-family: var(--oc-sans);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--oc-text-secondary);
  text-align: center;
}

.kicker {
  margin: 0 0 16px;
  font-family: var(--oc-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--oc-accent);
  text-align: center;
}

.threshold {
  display: grid;
  grid-template-areas: "slot";
  align-items: center;
  justify-items: center;
  min-height: 34px;
}

.threshold > * { grid-area: slot; }

#k {
  width: 200px;
  margin: 0;
  padding: 0 0 8px;
  font-family: var(--oc-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  color: var(--oc-text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--oc-rule);
  outline: none;
  appearance: none;
  box-shadow: none;
  transition: border-color 200ms linear, color 300ms linear;
}

#k::placeholder {
  color: var(--oc-text-secondary);
  font-style: normal;
  opacity: 1;
}

#k:focus { border-bottom-color: var(--oc-accent); }
#k:disabled { color: var(--oc-text); -webkit-text-fill-color: var(--oc-text); }
#k.text-hide { color: transparent; -webkit-text-fill-color: transparent; }

.kicker.is-gone,
body.oc-in .kicker.is-gone { opacity: 0; transition: opacity 300ms linear; }

.answer {
  margin: 0;
  font-family: var(--oc-sans);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--oc-text-secondary);
  opacity: 0;
  transition: opacity 300ms linear;
}

.answer.is-shown { opacity: 1; }

.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 44px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 40px;
  box-sizing: border-box;
}

.foot a {
  position: relative;
  font-family: var(--oc-sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--oc-text-secondary);
  text-decoration: none;
}

.foot a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 200ms ease-out;
}

.foot a:hover,
.foot a:focus-visible {
  color: var(--oc-green);
}

.foot a:hover::after,
.foot a:focus-visible::after {
  transform: scaleX(1);
}

.foot-year {
  font-family: var(--oc-sans);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--oc-text-secondary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .mark img { width: 255px; }
  .mark { padding: 14px; }
  .foot {
    bottom: 34px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
  }
}

.stage.no-threshold .top-pos { top: 46%; }

::selection {
  background: #8A6A2F;
  color: #EEEADE;
}

@media (prefers-reduced-motion: reduce) {
  #k, .answer, .foot a::after { transition: none; }
}
