@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/DMSans-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/DMSans-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/DMSans-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fdfaf6;
  --surface: #fffefa;
  --ink: #262626;
  --muted: #6f6962;
  --cream: #faf4cf;
  --yellow: #f2e297;
  --track: #f7f0e4;
  --line: rgba(38, 38, 38, 0.12);
  --shadow: 0 24px 70px rgba(73, 62, 45, 0.11);
  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --content: min(1160px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid #786a2f;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

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

.site-header {
  position: relative;
  z-index: 20;
  width: var(--content);
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 5px 16px rgba(38, 38, 38, 0.1);
}

.site-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a,
.footer-links a,
.language-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.footer-links a:hover,
.language-link:hover {
  color: var(--ink);
}

.language-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.66);
}

.hero {
  position: relative;
  width: var(--content);
  min-height: 730px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.88fr);
  align-items: center;
  gap: 80px;
  padding: 56px 0 90px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 26px;
  height: 2px;
  background: var(--yellow);
  content: "";
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(54px, 6.25vw, 88px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.99;
}

.hero h1 em {
  position: relative;
  z-index: 0;
  font-style: normal;
  white-space: nowrap;
}

.hero h1 em::after {
  position: absolute;
  z-index: -1;
  right: -0.05em;
  bottom: 0.04em;
  left: -0.04em;
  height: 0.28em;
  border-radius: 999px 14px 999px 20px;
  background: var(--yellow);
  content: "";
  transform: rotate(-1.4deg);
}

.hero-lead {
  max-width: 590px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.65vw, 20px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ink);
  color: white;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  box-shadow: 0 10px 24px rgba(38, 38, 38, 0.16);
  transform: translateY(-2px);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
  transform: none;
}

.button svg {
  width: 19px;
  height: 19px;
}

.hero-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
}

.hero-orbit {
  position: absolute;
  width: min(520px, 44vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cream);
}

.hero-orbit::before,
.hero-orbit::after {
  position: absolute;
  border: 1px solid rgba(38, 38, 38, 0.12);
  border-radius: 50%;
  content: "";
}

.hero-orbit::before {
  inset: 11%;
}

.hero-orbit::after {
  inset: 24%;
}

.phone {
  position: relative;
  z-index: 2;
  width: 286px;
  min-height: 584px;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 42px;
  background: var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(2.4deg);
}

.phone-screen {
  min-height: 552px;
  padding: 29px 20px 22px;
  overflow: hidden;
  border-radius: 29px;
  background: var(--paper);
}

.phone-status {
  display: flex;
  justify-content: space-between;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.phone-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.phone-title {
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.progress-card {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.progress-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.progress-value {
  font-family: var(--display);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.progress-goal {
  color: var(--muted);
  font-size: 11px;
}

.progress-track {
  height: 8px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--track);
}

.progress-fill {
  width: 59%;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}

.meal-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 22px;
}

.meal-heading strong {
  font-size: 12px;
}

.meal-heading span {
  color: var(--muted);
  font-size: 10px;
}

.meal-card {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.meal-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--cream);
  font-size: 17px;
}

.meal-name {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
}

.meal-detail {
  color: var(--muted);
  font-size: 9px;
}

.meal-protein {
  font-size: 11px;
  font-weight: 600;
}

.visual-tag {
  position: absolute;
  z-index: 3;
  right: -6px;
  bottom: 80px;
  max-width: 170px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(73, 62, 45, 0.12);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  transform: rotate(-3deg);
}

.visual-tag span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.section {
  padding: 112px 0;
}

.section-inner {
  width: var(--content);
  margin: 0 auto;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 52px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(38px, 4.2vw, 58px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.section-heading p {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.principles {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.principle-card {
  min-height: 250px;
  padding: 34px 30px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.principle-card:nth-child(3n) {
  border-right: 1px solid var(--line);
}

.principle-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--cream);
}

.principle-icon svg {
  width: 21px;
  height: 21px;
  stroke: var(--ink);
}

.principle-card h3 {
  margin: 32px 0 9px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.principle-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.download-section {
  position: relative;
}

.download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 60px;
  padding: clamp(34px, 5vw, 68px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.download-panel h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.download-copy > p {
  max-width: 600px;
  margin: 18px 0 30px;
  color: var(--muted);
  font-size: 17px;
}

.store-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.store-actions .button {
  padding-inline: 14px;
}

.release-meta {
  margin: 30px 0 0;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 16px;
  color: var(--muted);
  font-size: 13px;
}

.release-meta dt {
  font-weight: 600;
}

.release-meta dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.qr-card {
  align-self: start;
  padding: 24px;
  border-radius: 22px;
  background: var(--cream);
  text-align: center;
}

.qr-card img {
  width: 210px;
  height: 210px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 12px;
  background: white;
}

.qr-card strong {
  display: block;
  margin-top: 18px;
  font-size: 14px;
}

.qr-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.safety-note {
  margin-top: 18px;
  padding-left: 24px;
  position: relative;
  color: var(--muted);
  font-size: 12px;
}

.safety-note svg {
  position: absolute;
  top: 3px;
  left: 0;
  width: 15px;
  height: 15px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 42px 0;
}

.footer-inner {
  width: var(--content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.footer-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 24px;
}

/* Legal and support pages */
.legal-main {
  width: min(820px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 72px 0 112px;
}

.legal-header {
  margin-bottom: 54px;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}

.legal-header h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 76px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.legal-header p {
  margin: 18px 0 0;
  color: var(--muted);
}

.legal-content h2 {
  margin: 48px 0 13px;
  font-family: var(--display);
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.legal-content h3 {
  margin: 28px 0 9px;
  font-size: 17px;
}

.legal-content p,
.legal-content li {
  color: #514c47;
}

.legal-content ul {
  padding-left: 1.25em;
}

.legal-content a {
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

.notice-box {
  margin: 28px 0;
  padding: 24px;
  border-left: 4px solid var(--yellow);
  border-radius: 0 14px 14px 0;
  background: var(--cream);
}

.notice-box p:first-child {
  margin-top: 0;
}

.notice-box p:last-child {
  margin-bottom: 0;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 30px 0 44px;
}

.support-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.support-card h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 23px;
}

.support-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.support-card a {
  display: inline-block;
  margin-top: 18px;
  font-weight: 600;
}

.error-page {
  min-height: calc(100vh - 178px);
  display: grid;
  place-items: center;
  text-align: center;
}

.error-page p {
  color: var(--muted);
}

@media (max-width: 920px) {
  .site-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 54px;
    text-align: center;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-visual {
    min-height: 620px;
  }

  .hero-orbit {
    width: min(520px, 86vw);
  }

  .visual-tag {
    right: 8%;
  }

  .principle-grid {
    grid-template-columns: 1fr;
  }

  .principle-card,
  .principle-card:nth-child(3n) {
    min-height: auto;
    border-right: 1px solid var(--line);
  }

  .download-panel {
    grid-template-columns: 1fr;
  }

  .qr-card {
    width: min(100%, 310px);
  }
}

@media (max-width: 680px) {
  :root {
    --content: min(100% - 28px, 1160px);
  }

  .site-header {
    min-height: 74px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .header-actions {
    gap: 8px;
  }

  .hero {
    min-height: 0;
    padding: 46px 0 72px;
  }

  .hero h1 {
    font-size: clamp(47px, 14vw, 66px);
  }

  .hero h1 em {
    white-space: normal;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .hero-visual {
    min-height: 550px;
  }

  .phone {
    width: 260px;
    min-height: 530px;
  }

  .phone-screen {
    min-height: 498px;
  }

  .visual-tag {
    right: -4px;
    bottom: 40px;
  }

  .section {
    padding: 78px 0;
  }

  .section-heading {
    margin-bottom: 34px;
  }

  .principle-card {
    padding: 28px 24px;
  }

  .download-panel {
    gap: 38px;
    padding: 28px 20px;
    border-radius: 22px;
  }

  .store-actions {
    grid-template-columns: 1fr;
  }

  .release-meta {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .legal-main {
    width: min(100% - 28px, 820px);
    padding: 52px 0 84px;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
