@font-face {
  font-family: "Yuanshi Serif";
  src: url("assets/brand-serif.ttf") format("truetype");
  font-display: swap;
  font-weight: 400 900;
}

:root {
  --pine: #16261f;
  --pine-deep: #101c17;
  --rice: #f0e8d5;
  --rice-dim: rgba(240, 232, 213, 0.58);
  --rice-faint: rgba(240, 232, 213, 0.32);
  --persimmon: #d75a2b;
  --gold: #c9a24b;
  --sage: #7fa98c;
  --hairline: rgba(240, 232, 213, 0.16);
  --serif: "Yuanshi Serif", "Songti SC", "STSong", Georgia, serif;
  --latin: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(1.25rem, 3.2vw, 3rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  min-width: 320px;
  width: 100%;
  height: 100%;
}

body {
  position: relative;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--rice);
  background:
    radial-gradient(120% 90% at 78% 30%, rgba(56, 88, 70, 0.35) 0%, rgba(22, 38, 31, 0) 55%),
    linear-gradient(160deg, var(--pine) 0%, var(--pine-deep) 100%);
  font-family: var(--serif);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

::selection {
  color: var(--rice);
  background: var(--persimmon);
}

:focus-visible {
  outline: 2px solid var(--rice);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  transform: translateY(-180%);
  color: var(--rice);
  background: var(--persimmon);
  font-size: 0.8rem;
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.grain,
.ledger {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grain {
  z-index: 40;
  opacity: 0.44;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

.ledger {
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(to right, var(--hairline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hairline) 1px, transparent 1px);
  background-size: 25vw 100%, 100% 25vh;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  min-height: clamp(72px, 9.6vh, 88px);
  padding: clamp(0.9rem, 2.4vh, 1.7rem) var(--gutter);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
  background: rgba(16, 28, 23, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand__seal {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  transform: rotate(-4deg);
  color: #f7efe0;
  background: var(--persimmon);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(215, 90, 43, 0.35);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  writing-mode: vertical-rl;
}

.brand__text {
  display: block;
}

.brand__text strong {
  display: block;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.42em;
}

.brand__text small {
  display: block;
  margin-top: 0.25rem;
  color: var(--rice-dim);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 300;
  letter-spacing: 0.34em;
}

.header__catalog {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.6vw, 2.5rem);
}

.header__catalog a {
  color: var(--rice-dim);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
}

.header__catalog a {
  white-space: nowrap;
  text-decoration: none;
  transition: color 220ms ease;
}

.header__catalog a:hover,
.header__catalog a[aria-current="page"] {
  color: var(--rice);
}

main {
  position: relative;
  z-index: 10;
}

.hero {
  position: relative;
  display: grid;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  padding: clamp(5.6rem, 12vh, 7.5rem) var(--gutter) clamp(4.25rem, 9vh, 5.75rem);
  grid-template-columns: minmax(340px, 1.1fr) minmax(420px, 1fr) minmax(190px, 0.42fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3.5rem);
}

.intro {
  display: flex;
  max-height: 62vh;
  height: 100%;
  align-items: stretch;
  gap: clamp(1.25rem, 2.6vw, 2.75rem);
}

h1 {
  margin: 0;
  color: var(--rice);
  font-size: clamp(2.75rem, 7.6vh, 5.25rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.28;
  white-space: nowrap;
  writing-mode: vertical-rl;
}

h1 span {
  color: var(--persimmon);
}

.intro__copy {
  display: flex;
  max-width: 15rem;
  align-self: flex-end;
  flex-direction: column;
  align-items: flex-start;
}

.intro__copy > p {
  margin: 0;
  color: var(--rice-dim);
  font-size: 0.84rem;
  line-height: 2.1;
  text-align: justify;
}

.dial-zone {
  position: relative;
  display: grid;
  height: 100%;
  place-items: center;
}

.dial {
  position: relative;
  width: min(58vh, 34vw, 32.5rem);
  aspect-ratio: 1;
}

.dial__ticks {
  position: absolute;
  inset: 0;
  animation: spin 90s linear infinite;
}

.dial__orbit {
  position: absolute;
  inset: -9%;
  animation: spin 140s linear infinite reverse;
}

.dial__orbit span {
  position: absolute;
  color: var(--rice-faint);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  white-space: nowrap;
}

.dial__core {
  position: absolute;
  inset: 14%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.4rem, 1.2vh, 0.85rem);
  background: radial-gradient(circle at 38% 30%, rgba(56, 88, 70, 0.5), rgba(16, 28, 23, 0.85));
  border: 1px solid var(--hairline);
  border-radius: 50%;
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.35),
    0 30px 80px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.fading {
  transition: opacity 320ms ease;
}

.fading.is-fading {
  opacity: 0;
}

.specimen-heading h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vh, 1.9rem);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
}

.specimen-heading p {
  margin: 0.25rem 0 0;
  color: var(--rice-dim);
  font-family: var(--latin);
  font-size: clamp(0.7rem, 1.5vh, 0.9rem);
  font-style: italic;
  letter-spacing: 0.08em;
}

.calories {
  display: flex;
  margin-top: clamp(0.1rem, 0.8vh, 0.5rem);
  align-items: baseline;
  gap: 0.5rem;
}

.calories strong {
  color: var(--rice);
  font-family: var(--latin);
  font-size: clamp(3.25rem, 9vh, 5.75rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.calories span {
  color: var(--persimmon);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
}

.macros {
  display: flex;
  width: 62%;
  margin-top: clamp(0.25rem, 1vh, 0.65rem);
  flex-direction: column;
  gap: clamp(0.3rem, 0.9vh, 0.55rem);
}

.macro {
  display: grid;
  grid-template-columns: 3.4em 1fr 3.4em;
  align-items: center;
  gap: 0.6rem;
}

.macro > span {
  color: var(--rice-dim);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-align: left;
}

.macro > i {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: rgba(240, 232, 213, 0.14);
}

.macro > i > b {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--persimmon);
  transition: transform 1.1s var(--ease-out);
}

.macro:nth-child(2) > i > b {
  background: var(--gold);
}

.macro:nth-child(3) > i > b {
  background: var(--sage);
}

.macro output {
  color: var(--rice-dim);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.per-unit {
  margin: clamp(0.1rem, 0.8vh, 0.5rem) 0 0;
  color: var(--rice-faint);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.3em;
}

.specs {
  display: flex;
  min-width: 190px;
  padding-left: clamp(1rem, 1.8vw, 1.9rem);
  align-self: center;
  justify-self: end;
  flex-direction: column;
  gap: clamp(0.9rem, 2.4vh, 1.5rem);
  border-left: 1px solid var(--hairline);
}

.specs section h2 {
  margin: 0 0 0.38rem;
  color: var(--rice-faint);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.specs section p {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
}

.specs .specs__mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.specs__tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  color: var(--persimmon);
  border: 1px solid rgba(215, 90, 43, 0.55);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
}

.site-footer {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid var(--hairline);
  background: rgba(16, 28, 23, 0.74);
  backdrop-filter: blur(6px);
}

.ticker {
  padding: 0.62rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker__track {
  display: inline-block;
  color: var(--rice-faint);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  animation: marquee 46s linear infinite;
}

.ticker__track em {
  margin: 0 0.65rem;
  color: var(--persimmon);
  font-style: normal;
}

.legal-line {
  display: flex;
  margin: 0;
  padding: 0 1rem 0.55rem;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: rgba(240, 232, 213, 0.35);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-align: center;
}

.legal-line a {
  color: rgba(240, 232, 213, 0.54);
  text-decoration: none;
  transition: color 220ms ease;
}

.legal-line a:hover {
  color: var(--rice);
}

.legal-line a:focus-visible {
  color: var(--rice);
  outline-color: var(--persimmon);
  outline-offset: 2px;
}

.reveal {
  opacity: 0;
  transform: translateY(1.35rem);
  animation: rise 1s var(--ease-out) forwards;
}

.reveal--side {
  transform: translateX(-1.1rem);
}

.delay-1 {
  animation-delay: 100ms;
}

.delay-2 {
  animation-delay: 250ms;
}

.delay-3 {
  animation-delay: 400ms;
}

.delay-4 {
  animation-delay: 550ms;
}

.delay-5 {
  animation-delay: 750ms;
}

.delay-6 {
  animation-delay: 950ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1080px) {
  .hero {
    padding-top: clamp(5rem, 11vh, 6rem);
    padding-bottom: clamp(4.5rem, 10vh, 5.4rem);
    grid-template-columns: minmax(250px, 0.8fr) minmax(360px, 1.2fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 1rem 2rem;
  }

  .intro {
    max-height: 58vh;
  }

  .intro__copy {
    position: absolute;
    right: var(--gutter);
    bottom: clamp(5.6rem, 12vh, 7rem);
    left: calc(var(--gutter) + 1rem);
    max-width: none;
  }

  .intro__copy > p {
    max-width: 36rem;
  }

  .dial {
    width: min(54vh, 47vw, 28rem);
  }

  .specs {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 0.85rem 0 0;
    align-self: end;
    justify-self: stretch;
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--hairline);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 64px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .brand {
    gap: 0.7rem;
  }

  .brand__seal {
    width: 38px;
    height: 38px;
    font-size: 0.78rem;
  }

  .brand__text strong {
    font-size: 0.94rem;
  }

  .brand__text small {
    font-size: 0.48rem;
  }

  .header__catalog {
    gap: 0.8rem;
  }

  .header__catalog a {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }

  .hero {
    padding: 4.55rem 1rem 4.15rem;
    grid-template-columns: minmax(108px, 0.75fr) minmax(190px, 1.25fr);
    grid-template-rows: minmax(250px, 1fr) auto auto;
    align-items: center;
    gap: 0.55rem 0.35rem;
  }

  .intro {
    display: contents;
  }

  h1 {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    font-size: clamp(2.35rem, 11vw, 3.2rem);
    letter-spacing: 0.08em;
    line-height: 1.17;
  }

  .dial-zone {
    grid-column: 2;
    grid-row: 1;
  }

  .dial {
    width: min(57vw, 238px);
  }

  .dial__orbit span {
    font-size: 0.42rem;
    letter-spacing: 0.16em;
  }

  .dial__core {
    inset: 13%;
    gap: 0.28rem;
  }

  .specimen-heading h2 {
    font-size: 1rem;
  }

  .specimen-heading p {
    font-size: 0.55rem;
  }

  .calories {
    gap: 0.28rem;
  }

  .calories strong {
    font-size: clamp(2.55rem, 11vw, 3.5rem);
  }

  .calories span {
    font-size: 0.48rem;
  }

  .macros {
    width: 68%;
    gap: 0.2rem;
  }

  .macro {
    grid-template-columns: 2.8em 1fr 3em;
    gap: 0.3rem;
  }

  .macro > span,
  .macro output {
    font-size: 0.48rem;
  }

  .per-unit {
    font-size: 0.43rem;
  }

  .intro__copy {
    position: static;
    max-width: none;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .intro__copy > p {
    font-size: 0.67rem;
    line-height: 1.72;
    text-align: left;
  }

  .specs {
    display: grid;
    padding-top: 0.65rem;
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-self: end;
    gap: 0.45rem;
  }

  .specs section h2 {
    margin-bottom: 0.22rem;
    font-size: 0.43rem;
    letter-spacing: 0.12em;
  }

  .specs section p {
    font-size: 0.58rem;
    letter-spacing: 0.05em;
  }

  .specs__tag {
    padding: 0.1rem 0.22rem;
    font-size: 0.48rem;
    letter-spacing: 0.05em;
  }

  .ticker {
    padding: 0.35rem 0;
  }

  .legal-line {
    padding-bottom: 0.35rem;
    gap: 0.42rem;
    font-size: 0.48rem;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 360px) {
  .legal-line {
    flex-wrap: wrap;
    gap: 0.1rem 0.35rem;
  }

  .legal-line__separator {
    display: none;
  }
}

@media (max-height: 700px) and (min-width: 721px) {
  .site-header {
    min-height: 64px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .hero {
    padding-top: 4.6rem;
    padding-bottom: 4.5rem;
  }

  .dial {
    width: min(54vh, 29rem);
  }

  .intro {
    max-height: 57vh;
  }

  h1 {
    font-size: clamp(2.5rem, 7vh, 4.4rem);
  }

  .intro__copy > p {
    font-size: 0.76rem;
  }
}

.about {
  position: relative;
  padding: clamp(4.5rem, 10vh, 7rem) var(--gutter) clamp(8rem, 16vh, 10rem);
  border-top: 1px solid var(--hairline);
  scroll-margin-top: clamp(64px, 9.6vh, 88px);
}

.about__inner {
  display: grid;
  max-width: 72rem;
  margin: 0 auto;
  grid-template-columns: minmax(170px, 0.4fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
}

.about__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
}

.about__index {
  margin: 0;
  padding: 0.42rem 0.74rem;
  color: var(--rice-faint);
  border: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
}

.about__title {
  margin: 0;
  color: var(--rice);
  font-size: clamp(2.4rem, 5.6vh, 3.8rem);
  font-weight: 900;
  letter-spacing: 0.32em;
  line-height: 1.3;
  writing-mode: vertical-rl;
}

.about__slogan {
  margin: 0 0 clamp(1.6rem, 4vh, 2.4rem);
  color: var(--rice);
  font-size: clamp(1.2rem, 2.6vh, 1.65rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.9;
}

.about__slogan span {
  color: var(--persimmon);
  white-space: nowrap;
}

.about__body p {
  margin: 0 0 1.5rem;
  color: var(--rice-dim);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  line-height: 2.3;
  text-align: justify;
}

.about__pillars {
  display: grid;
  margin-top: clamp(2.2rem, 5vh, 3.2rem);
  padding-top: clamp(1.5rem, 3.6vh, 2.2rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
  border-top: 1px solid var(--hairline);
}

.about__pillars h3 {
  margin: 0 0 0.6rem;
  color: var(--rice);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.about__pillars p {
  margin: 0;
  color: var(--rice-dim);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  line-height: 1.95;
}

[data-scroll-reveal] {
  opacity: 0;
  transform: translateY(1.6rem);
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out);
}

[data-scroll-reveal="2"] {
  transition-delay: 140ms;
}

[data-scroll-reveal="3"] {
  transition-delay: 280ms;
}

[data-scroll-reveal].is-inview {
  opacity: 1;
  transform: none;
}

@media (max-width: 1080px) {
  .about__inner {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .about__head {
    flex-direction: row;
    align-items: center;
    gap: 1.4rem;
  }

  .about__title {
    letter-spacing: 0.24em;
    writing-mode: horizontal-tb;
  }
}

@media (max-width: 720px) {
  .about {
    padding-bottom: 7rem;
  }

  .about__title {
    font-size: 1.7rem;
  }

  .about__slogan {
    font-size: 1.05rem;
  }

  .about__body p {
    font-size: 0.84rem;
    line-height: 2.1;
  }

  .about__pillars {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
