/* Shared styles for the gura landing page.
 *
 * Extracted from index.html on 2026-08-17, when the Japanese page at /ja was
 * added. Two pages meant two copies of 370 lines of CSS, and a design change
 * made in one copy and not the other is the kind of drift nobody notices
 * until a screenshot looks wrong months later. One file, both pages.
 */
:root {
  --bg: #f4fbf9;
  --surface: #ffffff;
  --border: #d9eee7;
  --text: #1a2e28;
  --dim: #5f726b;
  --faint: #9aaba4;
  --mint: #43d9ad;
  --mint-deep: #36c99d;
  --mint-light: #5fe6c0;
  --pink: #ff8fab;
  --surfaceAlt: #e6fff6;
  --eating: #ffb86c;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* header */
header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(244, 251, 249, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .word { font-weight: 800; font-size: 22px; letter-spacing: -0.5px; }
.btn {
  display: inline-block; font-weight: 700; font-size: 15px;
  padding: 11px 22px; border-radius: 999px; cursor: pointer;
  background: var(--mint); color: #06281f; border: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 6px 16px rgba(54, 201, 157, 0.28);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(54, 201, 157, 0.36); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: none; border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surfaceAlt); }

/* hero */
.hero { padding: 88px 0 64px; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero-text h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.15; letter-spacing: -1px; font-weight: 800; }
.hero-text h1 .accent { color: var(--mint-deep); }
.hero-text p { font-size: clamp(16px, 2vw, 19px); color: var(--dim); margin: 20px 0 0; }
.hero-text .cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-text .note { margin-top: 16px; font-size: 14px; color: var(--faint); }
/* Store links. Until 2026-08-10 this page offered no way to install the
   app at all — only the browser version — so anyone arriving from a post
   about a phone app hit a dead end. */
.stores { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 600; text-decoration: none; line-height: 1.2;
}
.store-btn:hover { background: var(--surfaceAlt); }
.store-btn svg { flex: none; }
.store-btn small { display: block; font-size: 11px; font-weight: 500; color: var(--faint); }
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 64px 0 48px; }
}

/* phone mockup container */
.phone-wrap {
  display: flex; justify-content: center;
}
.phone-frame {
  position: relative;
  width: 280px; height: 580px;
  border-radius: 44px;
  overflow: hidden;
  background: var(--surface);
  border: 8px solid #1a1a1a;
  box-shadow:
    0 30px 60px rgba(26, 46, 40, 0.15),
    inset 0 0 0 8px #1a1a1a;
}
.phone-screen {
  width: 100%; height: 100%;
  overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg);
  font-size: 12px;
  padding: 12px 14px;
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 24px;
  background: #1a1a1a; border-radius: 0 0 20px 20px;
  z-index: 2;
}
.phone-content {
  padding-top: 6px;
  flex: 1; overflow-y: hidden;
}

/* phone UI elements */
.phone-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
  font-weight: 700; font-size: 13px;
}
.phone-greeting {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 3px;
}
.phone-date {
  font-size: 11px; color: var(--dim);
}

.phone-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(26, 46, 40, 0.04);
}

.weight-card {
  background: linear-gradient(135deg, rgba(67, 217, 173, 0.08), rgba(54, 201, 157, 0.05));
  border: 1px solid rgba(67, 217, 173, 0.2);
}

.weight-value {
  display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px;
}
.weight-num {
  font-size: 28px; font-weight: 800; color: var(--text);
}
.weight-unit {
  font-size: 12px; color: var(--dim); font-weight: 600;
}
.weight-delta {
  display: inline-block;
  background: rgba(67, 217, 173, 0.15);
  color: var(--mint-deep);
  font-size: 10px; font-weight: 700;
  padding: 3px 7px; border-radius: 6px;
  margin-bottom: 6px;
}

.chart-mini {
  width: 100%; height: 40px;
  margin-bottom: 6px;
}

.fasting-card {
  background: linear-gradient(135deg, rgba(67, 217, 173, 0.12), rgba(95, 230, 192, 0.08));
  border: 1px solid rgba(67, 217, 173, 0.25);
}

.fasting-label {
  font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
  margin-bottom: 4px;
}
.fasting-time {
  font-size: 22px; font-weight: 800; color: var(--mint-deep); margin-bottom: 6px;
}
.fasting-bar {
  width: 100%; height: 6px;
  background: rgba(67, 217, 173, 0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.fasting-fill {
  height: 100%;
  width: 67%;
  background: var(--mint-deep);
  border-radius: 3px;
}
.fasting-detail {
  font-size: 11px; color: var(--dim);
}

.calories-card {
  background: linear-gradient(135deg, rgba(255, 184, 108, 0.08), rgba(255, 184, 108, 0.04));
  border: 1px solid rgba(255, 184, 108, 0.15);
}
.calories-label {
  font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
  margin-bottom: 3px;
}
.calories-left {
  font-size: 20px; font-weight: 800; color: var(--eating);
}

.macros-card {
  background: var(--surface);
  border: 1px solid var(--border);
}
.macros-label {
  font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
  margin-bottom: 6px;
}
.macro-bar {
  display: flex; height: 18px; border-radius: 9px; overflow: hidden; gap: 0;
  background: var(--border);
}
.macro-seg-protein {
  flex: 1.2; background: #ff8fab;
}
.macro-seg-fat {
  flex: 0.8; background: #ffb86c;
}
.macro-seg-carbs {
  flex: 1.0; background: #5fe6c0;
}

.meal-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 6px; background: var(--surface);
  font-size: 12px;
}
.meal-time { font-weight: 700; color: var(--text); }
.meal-cal { color: var(--dim); font-size: 11px; }

.phone-nav {
  display: flex; justify-content: space-around; align-items: center;
  height: 40px; border-top: 1px solid var(--border);
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--surface);
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9px; color: var(--dim); }
.nav-item.active { color: var(--mint-deep); font-weight: 700; }

/* trust strip */
.trust-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
  margin: 48px 0;
}
.trust-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px;
}
.trust-chip {
  text-align: center; padding: 16px;
}
.trust-ico { font-size: 32px; margin-bottom: 10px; }
.trust-title { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.trust-text { font-size: 14px; color: var(--dim); }

/* feature rows */
.features-section { padding: 64px 0; }
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  margin-bottom: 80px;
}
.feature-row.alt { grid-template-columns: 1fr 1fr; }
.feature-row.alt .text { order: 2; }
.feature-row.alt .visual { order: 1; }
.feature-text h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.feature-text p { font-size: 16px; color: var(--dim); line-height: 1.7; margin-bottom: 12px; }
.feature-visual { display: flex; justify-content: center; }
@media (max-width: 768px) {
  /* `.feature-row.alt` must be named here too. A media query adds no
     specificity, so the one-column rule below loses to `.feature-row.alt`
     above it and the alternating rows stayed two-column on phones — a 240px
     mockup squeezed into a 147px column, pushing the whole page 8px sideways.
     Measured on a 390px viewport, and present since before /ja existed. */
  .feature-row,
  .feature-row.alt { grid-template-columns: 1fr; gap: 32px; margin-bottom: 56px; }
  .feature-row.alt .text { order: unset; }
  .feature-row.alt .visual { order: unset; }
}

/* small phone mockup for features */
.phone-frame-sm {
  position: relative;
  width: 240px; height: 480px;
  border-radius: 36px;
  overflow: hidden;
  background: var(--surface);
  border: 6px solid #1a1a1a;
  box-shadow: 0 20px 40px rgba(26, 46, 40, 0.12);
}
.phone-screen-sm {
  width: 100%; height: 100%;
  overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg);
  padding: 10px 12px;
}
.phone-notch-sm {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100px; height: 20px;
  background: #1a1a1a; border-radius: 0 0 16px 16px;
  z-index: 2;
}

/* how it works */
.how-section { padding: 64px 0; text-align: center; }
.how-section h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 48px; }
.how-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px;
}
.step {
  padding: 24px;
}
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint-light), var(--mint-deep));
  color: #fff; font-weight: 800; font-size: 20px;
  margin: 0 auto 16px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.step p { font-size: 15px; color: var(--dim); }

/* values band */
.values-band {
  background: linear-gradient(135deg, var(--mint-light), var(--mint-deep));
  color: #04261d;
  border-radius: 24px;
  padding: 56px 40px;
  text-align: center;
  margin: 48px 0 72px;
}
.values-band h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.5px; margin-bottom: 16px; }
.values-band p { max-width: 620px; margin: 0 auto; font-size: 17px; opacity: 0.95; }

/* faq */
.faq-section { padding: 64px 0; }
.faq-section h2 { text-align: center; font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 40px; }
.qa {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.qa:hover { border-color: var(--mint); box-shadow: 0 4px 16px rgba(67, 217, 173, 0.1); }
.qa h3 {
  font-size: 17px; font-weight: 700; display: flex; justify-content: space-between; align-items: center;
}
.qa-toggle { font-size: 20px; transition: transform 0.3s; }
.qa.open .qa-toggle { transform: rotate(180deg); }
.qa p {
  font-size: 15px; color: var(--dim); margin-top: 12px; max-height: 0; overflow: hidden;
  transition: max-height 0.3s, margin-top 0.3s;
}
.qa.open p { max-height: 200px; margin-top: 14px; }
.qa a { color: var(--mint-deep); font-weight: 600; }

/* footer */
footer { border-top: 1px solid var(--border); padding: 48px 0 64px; }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.foot .links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot a { color: var(--dim); font-size: 14px; transition: color 0.2s; }
.foot a:hover { color: var(--text); }
.foot .copy { color: var(--faint); font-size: 13px; }
@media (max-width: 640px) {
  .foot { flex-direction: column; align-items: flex-start; }
  .foot .links { flex-direction: column; gap: 12px; }
}

/* language switch — the English and Japanese pages are the same page, so the
   link between them lives in the header where a reader looks for it, not
   buried in the footer. No automatic redirect by browser language: Google
   crawls from the US, and a forced redirect hides one version from search. */
.lang-switch { display: flex; align-items: center; gap: 8px; margin-right: 4px; }
.lang-switch a {
  font-size: 13px; font-weight: 700; color: var(--faint);
  padding: 5px 10px; border-radius: 999px; line-height: 1;
}
.lang-switch a:hover { color: var(--text); background: var(--surfaceAlt); }
.lang-switch a[aria-current="true"] { color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.nav-right { display: flex; align-items: center; gap: 10px; }
@media (max-width: 420px) {
  .lang-switch a { padding: 5px 7px; font-size: 12px; }
  .btn { padding: 10px 16px; font-size: 14px; }
}

/* Japanese typography.
   These rules only match a document that declared itself Japanese, so the
   English page is untouched. They exist because Japanese sets full-width
   characters: a heading sized and tracked for English runs past its column and
   breaks wherever it lands — the first render of /ja put 「に。」 alone on a
   third line. Negative letter-spacing, which tightens Latin nicely, only
   cramps kana and kanji. */
:lang(ja) h1 {
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.4;
  letter-spacing: 0;
  text-wrap: pretty;
}
:lang(ja) .feature-text h2,
:lang(ja) .how-section h2,
:lang(ja) .faq-section h2,
:lang(ja) .values-band h2 {
  font-size: clamp(23px, 3.2vw, 33px);
  letter-spacing: 0;
  line-height: 1.4;
  text-wrap: pretty;
}
/* Two rules above read `pretty` rather than `balance`, and they pair with the
   `auto-phrase` below. `auto-phrase` breaks Japanese only at phrase boundaries
   (文節); `balance` then re-cut those lines to equalise their lengths and split
   words anyway — measured at 390px it put 大部/分 across a line on /blog.
   `pretty` still prevents the lone 「に。」 that `balance` was added for.
   Together they gave 0 mid-word breaks across the 10 articles and the ja LP,
   against 5 before. Browsers lacking either property drop the declaration. */
:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3 {
  word-break: auto-phrase;
}

/* Japanese must not begin a line with 。 or 、 nor end one with an opening
   bracket. `strict` is the rule set that forbids it. */
:lang(ja) { line-break: strict; }
:lang(ja) .qa h3 { line-height: 1.5; }
