/* ==========================================================================
   YH Mobile — site styles
   Light only. The white design is the design; there is no dark variant.
   No external fonts, no third-party assets.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
  --bg:          #FFFFFF;
  --bg-alt:      #F6F8F8;
  --surface:     #FFFFFF;
  --ink:         #0E1413;
  --ink-2:       #56635F;
  --ink-3:       #7F8C88;
  --line:        #E3E9E7;
  --line-strong: #CFD9D6;
  --accent:      #006064;
  --accent-ink:  #004347;
  --accent-soft: #E0F4F5;
  --shadow-sm:   0 1px 2px rgba(14, 20, 19, .05);
  --shadow-md:   0 10px 30px -12px rgba(14, 20, 19, .18);

  --radius-sm:  10px;
  --radius:     14px;
  --radius-lg:  20px;

  --container:  1120px;
  --header-h:   68px;

  --ease: cubic-bezier(.2, 0, 0, 1);

  color-scheme: light;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-weight: 640;
  letter-spacing: -0.022em;
  line-height: 1.15;
  text-wrap: balance;
}

p { text-wrap: pretty; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 620;
  letter-spacing: -0.02em;
  font-size: 1.0625rem;
  margin-right: auto;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .9375rem;
  color: var(--ink-2);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--bg-alt); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease),
              border-color .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-ink); }

.btn-outline {
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--ink-3); background: var(--bg-alt); }

.btn-sm { padding: 8px 15px; font-size: .875rem; }

.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* --- Hero --------------------------------------------------------------- */

.hero {
  padding: clamp(64px, 11vw, 128px) 0 clamp(48px, 7vw, 80px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 40% auto -20%;
  height: 620px;
  background: radial-gradient(closest-side,
              color-mix(in srgb, var(--accent) 13%, transparent), transparent);
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  font-weight: 560;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.25rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 16ch;
}

.hero-lead {
  margin-top: 24px;
  max-width: 52ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--ink-2);
}

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

.stats {
  margin-top: clamp(48px, 7vw, 76px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 0;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.stats li {
  flex: 1 1 190px;
  padding-right: 24px;
}
.stats li + li {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.stat-num {
  display: block;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
  font-weight: 640;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat-label {
  display: block;
  margin-top: 4px;
  font-size: .875rem;
  color: var(--ink-2);
}

/* --- Sections ----------------------------------------------------------- */

.section { padding: clamp(64px, 9vw, 104px) 0; }
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  letter-spacing: -0.03em;
}
.section-head p {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

/* --- App grid ----------------------------------------------------------- */

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.app-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), border-color .22s var(--ease),
              box-shadow .22s var(--ease);
}
.app-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-md);
}

.app-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  object-fit: cover;
}

.app-body { min-width: 0; flex: 1; }

.app-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.app-name .arrow {
  color: var(--ink-3);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.app-card:hover .app-name .arrow { opacity: 1; transform: translateX(0); }

.app-desc {
  margin-top: 6px;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.tag {
  font-size: .75rem;
  font-weight: 520;
  letter-spacing: .01em;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.tag-accent {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.section-foot {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: .9375rem;
  color: var(--ink-2);
}

/* --- Principles --------------------------------------------------------- */

.principles {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.principle {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.principle-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.principle h3 {
  font-size: 1.0625rem;
  font-weight: 600;
}
.principle p {
  margin-top: 8px;
  font-size: .9375rem;
  color: var(--ink-2);
  line-height: 1.55;
}

/* --- Contact ------------------------------------------------------------ */

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.contact h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -0.03em;
}
.contact p {
  margin-top: 10px;
  color: var(--ink-2);
  max-width: 46ch;
}
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  background: var(--bg);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}
.footer-brand { max-width: 34ch; }
.footer-brand .brand { margin-right: 0; }
.footer-brand p {
  margin-top: 14px;
  font-size: .9375rem;
  color: var(--ink-2);
}
.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.footer-col h4 {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.footer-col li + li { margin-top: 9px; }
.footer-col a {
  font-size: .9375rem;
  color: var(--ink-2);
  transition: color .18s var(--ease);
}
.footer-col a:hover { color: var(--ink); }

.footer-bottom.bare {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  font-size: .875rem;
  color: var(--ink-3);
}

/* --- Legal / prose pages ------------------------------------------------ */

.prose {
  max-width: 74ch;
  padding: clamp(48px, 7vw, 80px) 0 clamp(56px, 8vw, 96px);
}
.prose h1 {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}
.prose .meta {
  margin-top: 12px;
  font-size: .9375rem;
  color: var(--ink-3);
}
.prose h2 {
  font-size: 1.1875rem;
  margin-top: 2.2em;
  margin-bottom: .5em;
}
.prose p, .prose ul { margin-top: 1em; color: var(--ink-2); }
.prose ul { padding-left: 1.1em; list-style: disc; }
.prose li { margin-top: .4em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .875em;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9375rem;
  color: var(--ink-2);
  margin-bottom: 28px;
}
.back-link:hover { color: var(--ink); }

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

.center-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: grid;
  place-content: center;
  text-align: center;
  gap: 18px;
  padding: 80px 0;
}
.center-page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.center-page p { color: var(--ink-2); }
.center-page .eyebrow { justify-content: center; margin-bottom: 0; }
.center-page .actions { margin-top: 14px; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 760px) {
  body { font-size: 16px; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 12px; font-size: 1rem; }

  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }

  .stats li { flex-basis: 100%; padding-right: 0; }
  .stats li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }

  .grid { grid-template-columns: 1fr; }
  .footer-cols { gap: 32px; }
}

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