/* ============================================================
   sosone homepage — redesign
   Ported from the Claude Design system (tokens + components).
   Self-contained: this file is the only stylesheet the new
   home depends on.
   ============================================================ */

/* ---- Webfonts: Pretendard (UI/body, self-hosted variable woff2) +
   IBM Plex Mono (labels, via Google Fonts) ---- */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&display=swap");

@font-face {
  font-family: "Pretendard Variable";
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: local("Pretendard Variable"),
       url("/fonts/PretendardVariable.woff2") format("woff2-variations");
}

/* ============================================================
   Tokens
   ============================================================ */
:root {
  /* Brand point color (single accent) */
  --blue-500: oklch(0.55 0.14 250);
  --blue-600: oklch(0.50 0.13 250);
  --blue-700: oklch(0.45 0.11 250);
  --blue-050: oklch(0.96 0.03 250);

  /* Ink (near-black warm neutrals) */
  --ink-900: #16160f;
  --ink-800: #1a1a17;

  /* Warm paper neutrals */
  --paper-desk: #e9e8e4;
  --paper-0: #fbfaf7;
  --paper-1: #f5f3ee;
  --surface: #ffffff;

  /* Text */
  --text-strong: #16160f;
  --text-body: #57554e;
  --text-muted: #66645d;
  --text-subtle: #77746c;
  --text-faint: #8a8880;
  --text-ghost: #9a988f;

  /* Borders / hairlines */
  --border-strong: #cfccc3;
  --border: #dcdad3;
  --border-soft: #e7e4dc;
  --hairline: #eeece6;

  /* Dark footer surface */
  --footer-bg: #16160f;
  --footer-text: #c9c7bf;
  --footer-faint: #89877f;
  --footer-ghost: #67655e;
  --footer-rule: #2b2a24;

  /* Semantic aliases */
  --color-primary: var(--blue-500);
  --color-primary-press: var(--blue-600);
  --color-on-primary: #ffffff;
  --link: var(--blue-500);
  --page-bg: var(--paper-0);
  --section-bg: var(--paper-1);
  --surface-card: var(--surface);

  /* Type */
  --font-sans: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fs-hero: 52px;
  --fs-display: 38px;
  --fs-h2: 32px;
  --fs-title: 25px;
  --fs-app-name: 17px;
  --fs-lead: 17.5px;
  --fs-body: 15px;
  --lh-tight: 1.13;
  --lh-body: 1.65;
  --tracking-tight: -0.03em;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 13px;
  --radius-xl: 16px;
  --radius-frame: 16px;
  --radius-pill: 20px;
  --radius-device: 34px;

  /* Shadow */
  --shadow-frame: 0 24px 60px -34px rgba(0, 0, 0, 0.30);
  --icon-inset: inset 0 0 0 1px rgba(0, 0, 0, 0.05);

  /* Layout */
  --content-max: 1200px;
  --gutter: 44px;
}

/* ============================================================
   Reset / base
   ============================================================ */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--page-bg);
  color: var(--text-strong);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { opacity: 0.75; }

h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }
button { font-family: inherit; }

.mono { font-family: var(--font-mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   Frame
   ============================================================ */
.desk { min-height: 100vh; background: var(--page-bg); }
.frame { width: 100%; background: var(--page-bg); }

/* Full-bleed section backgrounds with the content centered to --content-max.
   Horizontal padding grows on wide screens so content never exceeds the max
   width, while each section's background still spans the full viewport. */
.header,
.hero,
.section,
.about,
.cta,
.footer {
  padding-inline: max(var(--gutter), calc((100% - var(--content-max)) / 2));
}

.section { padding-block: 60px; }

/* ============================================================
   Wordmark
   ============================================================ */
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark img { width: 26px; height: 26px; display: block; }
.wordmark span {
  font-size: 21px; font-weight: var(--fw-semibold);
  letter-spacing: -0.02em; color: var(--text-strong);
}
.wordmark--dark span { color: #fff; }

/* ============================================================
   Header
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 20px;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.header__right { display: flex; align-items: center; gap: 34px; }
.nav { display: flex; gap: 28px; font-size: 14.5px; }
.nav a { color: #3a3a35; }

.header__menu-btn {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 6px; color: var(--text-strong); border-radius: 8px;
}
.header__menu-btn svg { width: 22px; height: 22px; display: block; }

/* ---- Language toggle (segmented pill) ---- */
.lang {
  display: inline-flex; border: 1px solid var(--border);
  border-radius: var(--radius-pill); overflow: hidden;
}
.lang a {
  padding: 6px 12px; font-size: 12px; line-height: 1;
  color: var(--text-muted); opacity: 1;
}
.lang a:hover { opacity: 1; background: rgba(0, 0, 0, 0.03); }
.lang a[aria-current="true"] {
  background: var(--color-primary); color: var(--color-on-primary);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-block: 96px 92px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 24px;
}
.hero h1 {
  font-size: var(--fs-hero); line-height: var(--lh-tight);
  font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight);
  text-wrap: balance; max-width: 760px;
}
.hero p {
  font-size: var(--fs-lead); line-height: var(--lh-body);
  color: var(--text-body); max-width: 540px; text-wrap: pretty;
}
.hero__cta { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: var(--fs-body);
  font-weight: var(--fw-medium); line-height: 1;
  padding: 15px 30px; border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none;
  transition: opacity 0.16s ease; border: 1px solid transparent;
}
.btn:hover { opacity: 0.75; }
.btn--primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn--secondary { background: transparent; color: var(--ink-800); border-color: var(--border-strong); }
.btn--lg { font-size: 16px; padding: 16px 36px; }

/* ============================================================
   Badge
   ============================================================ */
.badge { display: inline-flex; align-items: center; line-height: 1; white-space: nowrap; }
.badge--tint {
  font-size: 12.5px; color: var(--blue-700); background: var(--blue-050);
  padding: 7px 14px; border-radius: var(--radius-pill);
}
.badge--accent {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--blue-500);
}

/* ============================================================
   Section head
   ============================================================ */
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 26px; }
.section-head h2 {
  font-size: var(--fs-title); font-weight: var(--fw-semibold); letter-spacing: -0.02em;
}
.section-head__rule { flex: 1; height: 1px; background: #e3e0d8; }
.section-head__meta { font-size: 11px; color: var(--text-ghost); }

/* ============================================================
   Featured section
   ============================================================ */
.featured {
  background: var(--section-bg);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.featured__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border-soft); border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl); overflow: hidden;
}

/* Featured card */
.fcard { background: var(--surface-card); padding: 24px; display: flex; gap: 18px; }
.fcard__icon {
  width: 62px; height: 62px; flex: 0 0 auto;
  border-radius: var(--radius-xl); box-shadow: var(--icon-inset);
  background-size: cover; background-position: center;
}
.fcard__body { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.fcard__name { font-size: var(--fs-app-name); font-weight: var(--fw-semibold); color: var(--text-strong); }
.fcard__desc { font-size: 13.5px; line-height: 1.55; color: var(--text-muted); margin-top: 2px; }
.fcard__stores { margin-top: 9px; }

/* ============================================================
   All apps section
   ============================================================ */
.allapps__head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-bottom: 24px;
}
.allapps__head h2 { font-size: var(--fs-title); font-weight: var(--fw-semibold); letter-spacing: -0.02em; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 15px; border-radius: var(--radius-pill); cursor: pointer;
  font-family: var(--font-sans); font-size: 12.5px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.chip[aria-pressed="true"] {
  border-color: var(--color-primary); background: var(--color-primary);
  color: var(--color-on-primary);
}

.allapps__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Compact card */
.acard {
  background: var(--surface-card); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 18px; display: flex; gap: 14px;
  align-items: flex-start; min-height: 118px;
}
.acard[hidden] { display: none; }
.acard__icon {
  width: 50px; height: 50px; flex: 0 0 auto;
  border-radius: var(--radius-xl); box-shadow: var(--icon-inset);
  background-size: cover; background-position: center;
}
.acard__body { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; }
.acard__name { font-size: 14.5px; font-weight: var(--fw-semibold); color: var(--text-strong); }
.acard__desc { font-size: 12px; line-height: 1.45; color: var(--text-subtle); margin-top: 3px; }

/* Footer slot: a reserved, fixed-height area pinned to the card bottom
   (margin-top:auto). The platform line and the store buttons share this slot
   and swap by opacity only — so the badges never overlap the text and the
   layout never shifts, no matter how long the name/description is. */
.acard__foot { position: relative; height: 32px; margin-top: auto; padding-top: 12px; }
.acard__platform {
  position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--text-ghost); transition: opacity 0.16s;
}
.acard__platform .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--blue-500); }
.acard__stores { position: absolute; left: 0; bottom: 0; transition: opacity 0.16s; }
.acard__stores .stores { flex-wrap: nowrap; }

/* Hover-capable devices: show platform line, reveal stores on hover. */
@media (hover: hover) {
  .acard__stores { opacity: 0; pointer-events: none; }
  .acard:hover .acard__platform { opacity: 0; }
  .acard:hover .acard__stores { opacity: 1; pointer-events: auto; }
}
/* Touch / no-hover devices: no hover to reveal, so show the stores outright. */
@media (hover: none) {
  .acard__platform { opacity: 0; pointer-events: none; }
  .acard__stores { opacity: 1; }
}

/* ---- Store buttons ---- */
.stores { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stores a { display: inline-flex; transition: opacity 0.16s ease; }
.stores a:hover { opacity: 0.8; }
.stores img { height: 32px; width: auto; display: block; }

/* ============================================================
   About (full-bleed blue)
   ============================================================ */
.about { padding-block: 66px; background: var(--color-primary); color: #fff; }
.about__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.about__kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; opacity: 0.7; margin-bottom: 12px; }
.about h2 { font-size: var(--fs-h2); font-weight: var(--fw-semibold); line-height: 1.25; letter-spacing: -0.02em; }
.about__points { display: flex; flex-direction: column; gap: 18px; }
.about__point { display: flex; gap: 14px; align-items: flex-start; }
.about__point .num { font-family: var(--font-mono); font-size: 12px; opacity: 0.6; padding-top: 3px; }
.about__point p { font-size: 16.5px; line-height: 1.6; }

/* ============================================================
   Bottom CTA
   ============================================================ */
.cta {
  padding-block: 80px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.cta h2 { font-size: var(--fs-display); font-weight: var(--fw-semibold); letter-spacing: -0.02em; }

/* ============================================================
   Footer
   ============================================================ */
.footer { padding-block: var(--gutter); background: var(--footer-bg); color: var(--footer-text); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer__col { display: flex; flex-direction: column; gap: 11px; font-size: 13.5px; }
.footer__brand { gap: 12px; }
.footer__tag { font-size: 13px; line-height: 1.6; color: var(--footer-faint); max-width: 260px; }
.footer__label { font-family: var(--font-mono); color: var(--footer-ghost); font-size: 11px; letter-spacing: 0.1em; }
.footer a { color: var(--footer-text); }
.footer .lang { border-color: var(--footer-rule); align-self: flex-start; }
.footer .lang a { color: var(--footer-text); }
.footer .lang a[aria-current="true"] { color: var(--color-on-primary); }
.footer__bottom {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--footer-rule);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--font-mono); font-size: 11px; color: var(--footer-ghost);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 28px; }
  .allapps__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; --fs-hero: 34px; --fs-display: 27px; --fs-h2: 25px; --fs-title: 21px; }
  .header { padding-block: 16px; }
  .nav { display: none; }
  .header__menu-btn { display: inline-flex; }
  .hero { padding-block: 64px 60px; }
  .section { padding-block: 48px; }
  .featured__grid { grid-template-columns: 1fr; }
  .allapps__grid { grid-template-columns: 1fr; }
  .filters { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 2px; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Mobile nav drawer */
  .nav.is-open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--surface);
    border-bottom: 1px solid var(--hairline); padding: 8px var(--gutter) 16px;
    box-shadow: 0 12px 24px -18px rgba(0, 0, 0, 0.4);
  }
  .nav.is-open a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--hairline); }
  .nav.is-open a:last-child { border-bottom: 0; }
}

/* ============================================================
   Motion
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { animation: fadeUp 0.5s ease both; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { animation: none; }
}
