/* DutyCal website — design system mirror + layout
   Swiss-flat, navy + warm paper. 4pt grid. Two weights (400/600 for web display). */

:root {
  /* paper + surfaces */
  --bg: #F7F6F1;
  --section: #EFEDE6;
  --card: #FFFFFF;
  /* text */
  --t1: #15171A;
  --t2: #5F6066;
  --t3: #8C8D92;
  --hair: #E4E2DC;
  --hair-strong: #C8C5BD;
  /* accent + signal */
  --accent: #1B3A5C;
  --accent-pressed: #142A45;
  --signal: #C8503A;
  --pos: #3F7A5C;
  /* duty palette (for mockups) */
  --duty-flight: #15171A;
  --duty-hotel: #7B8B96;
  --duty-sb-air: #C8503A;
  --duty-sb-home: #B89253;
  --duty-training: #1B3A5C;
  --duty-sick: #C9BAD9;
  --duty-off: #C8C5BD;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --ja: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', var(--font);
  --mono: 'SF Mono', ui-monospace, Menlo, monospace;

  --maxw: 1120px;
}

[data-theme="dark"] {
  --bg: #0F1217;
  --section: #181C22;
  --card: #1F242C;
  --t1: #ECEBE5;
  --t2: #9B9C98;
  --t3: #65676B;
  --hair: #24272E;
  --hair-strong: #3A3D43;
  --accent: #5C8FC2;
  --accent-pressed: #4477AB;
  --signal: #E37F66;
  --pos: #5FBE8C;
  --duty-flight: #ECEBE5;
  --duty-hotel: #9FB0BB;
  --duty-sb-air: #E37F66;
  --duty-sb-home: #D4A86A;
  --duty-training: #5C8FC2;
  --duty-off: #3A3D43;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--t1);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  transition: background 200ms ease, color 200ms ease;
}
:lang(ja), [lang="ja"] body, body.ja { }
body.ja, body.ja * { font-family: var(--ja); }

.tnum { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* eyebrow / caption */
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--signal);
}
body.ja .eyebrow { text-transform: none; letter-spacing: 0; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.4px; }
.brand .mark { width: 30px; height: 30px; border-radius: 7px; overflow: hidden; border: 1px solid var(--hair); flex-shrink: 0; }
.nav-links { display: flex; gap: 28px; margin-left: auto; align-items: center; }
.nav-links a { font-size: 15px; color: var(--t2); transition: color 150ms; }
.nav-links a:hover { color: var(--t1); }
.nav-tools { display: flex; align-items: center; gap: 12px; }

/* lang toggle */
.langtoggle { display: inline-flex; border: 1px solid var(--hair-strong); border-radius: 7px; overflow: hidden; }
.langtoggle button {
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.3px;
  padding: 6px 11px; background: transparent; color: var(--t2); border: 0; cursor: pointer;
  white-space: nowrap; line-height: 1;
}
.langtoggle button.active { background: var(--accent); color: #fff; }
[data-theme="dark"] .langtoggle button.active { color: #0F1217; }

.themebtn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--hair-strong); background: transparent; color: var(--t2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.themebtn:hover { color: var(--t1); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 16px; font-weight: 600; letter-spacing: -0.2px;
  padding: 12px 22px; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  transition: background 150ms, transform 80ms;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-primary { color: #0F1217; }
.btn-primary:hover { background: var(--accent-pressed); }
.btn-ghost { background: transparent; color: var(--t1); border-color: var(--hair-strong); }
.btn-ghost:hover { border-color: var(--t2); }
.btn-sm { font-size: 14px; padding: 8px 16px; }
.nav .btn { font-size: 14px; padding: 9px 16px; white-space: nowrap; }

/* ── HERO ── */
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1fr 0.82fr; gap: 56px; align-items: center; }
.hero h1 {
  font-size: clamp(40px, 5.4vw, 68px); font-weight: 600; line-height: 1.02;
  letter-spacing: -2px; margin-bottom: 22px;
}
body.ja .hero h1 { letter-spacing: -1px; line-height: 1.12; font-size: clamp(34px, 4.6vw, 56px); }
.hero .sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--t2); max-width: 30em; margin-bottom: 32px; line-height: 1.55; }
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-cta .restore { font-size: 15px; color: var(--accent); font-weight: 500; }
.hero-cta .restore:hover { text-decoration: underline; }
.hero-meta { margin-top: 22px; font-size: 13px; color: var(--t3); letter-spacing: 0.2px; }

/* ── PHONE FRAME ── */
.phone {
  width: 300px; aspect-ratio: 300 / 620; margin: 0 auto;
  background: var(--card); border-radius: 40px; position: relative;
  border: 1px solid var(--hair);
  box-shadow: 0 2px 6px rgba(11,11,12,0.06), 0 24px 64px rgba(11,11,12,0.12);
  overflow: hidden;
}
[data-theme="dark"] .phone { box-shadow: 0 2px 6px rgba(0,0,0,0.3), 0 24px 64px rgba(0,0,0,0.4); }
.phone-notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 96px; height: 26px; background: #000; border-radius: 16px; z-index: 6; }
.phone-screen { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.phone-status { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px 0; font-size: 12px; font-weight: 600; }
.phone-body { flex: 1; overflow: hidden; padding: 8px 0 0; }

.hero .phone { width: 320px; }

/* mock primitives */
.m-title { font-size: 26px; font-weight: 600; letter-spacing: -0.6px; padding: 6px 18px 12px; }
.m-eyebrow { font-size: 8.5px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--t3); }
.m-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 9px; padding: 9px 18px; border-top: 1px solid var(--hair); align-items: start; }
.m-time { display: flex; flex-direction: column; }
.m-time b { font-size: 11px; font-weight: 600; }
.m-time span { font-size: 11px; color: var(--t2); }
.m-bar { width: 2px; align-self: stretch; min-height: 22px; margin: 2px 0; }
.m-mid { display: flex; gap: 8px; min-width: 0; }
.m-mid > div { min-width: 0; }
.m-p { font-size: 12px; font-weight: 600; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-s { font-size: 10px; color: var(--t2); margin-top: 1px; }
.m-chip { font-size: 8px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--hair-strong); color: var(--t2); align-self: center; margin-left: 2px; white-space: nowrap; }
.m-chip.flight { border-color: var(--duty-flight); color: var(--duty-flight); }
.m-daynum { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; }
.m-daynum.today { color: var(--signal); }

/* tab bar */
.m-tabs { display: flex; border-top: 1px solid var(--hair); padding: 7px 0 14px; margin-top: auto; }
.m-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 8px; color: var(--t3); }
.m-tab.active { color: var(--accent); }
.m-tab svg { width: 19px; height: 19px; }

/* ── SECTION SCAFFOLD ── */
section { padding: 88px 0; }
.section-alt { background: var(--section); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 600; letter-spacing: -1px; margin: 12px 0 14px; line-height: 1.1; }
body.ja .section-head h2 { letter-spacing: -0.4px; }
.section-head p { font-size: 18px; color: var(--t2); line-height: 1.55; }

/* ── PILLARS ── */
.pillar { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 56px 0; }
.pillar + .pillar { border-top: 1px solid var(--hair); }
.pillar.flip .pillar-art { order: -1; }
.pillar-text h3 { font-size: clamp(24px, 2.8vw, 32px); font-weight: 600; letter-spacing: -0.6px; margin: 12px 0 16px; line-height: 1.12; }
.pillar-text p { font-size: 17px; color: var(--t2); line-height: 1.6; margin-bottom: 18px; }
.pillar-hook { display: inline-flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 600; color: var(--t1); border-left: 2px solid var(--signal); padding-left: 12px; }
.pillar-art { display: flex; justify-content: center; }

/* ── PROOF BAND ── */
.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.proof-item { background: var(--card); padding: 28px 26px; }
.proof-item .ico { width: 26px; height: 26px; color: var(--accent); margin-bottom: 14px; }
.proof-item h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.3px; margin-bottom: 6px; }
.proof-item p { font-size: 14px; color: var(--t2); line-height: 1.5; }

/* isn't list */
.isnt { margin-top: 48px; }
.isnt h3 { font-size: 14px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--t3); margin-bottom: 18px; }
body.ja .isnt h3 { text-transform: none; }
.isnt-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.isnt-item { font-size: 14px; color: var(--t2); padding-left: 22px; position: relative; line-height: 1.4; }
.isnt-item::before { content: "—"; position: absolute; left: 0; color: var(--signal); font-weight: 600; }

/* ── PRICING ── */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 0 auto; }
.price-card { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 32px 30px; position: relative; }
.price-card.best { border-color: var(--accent); border-width: 2px; }
.price-badge { position: absolute; top: 0; right: 24px; transform: translateY(-50%); background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; padding: 4px 12px; border-radius: 5px; }
[data-theme="dark"] .price-badge { color: #0F1217; }
body.ja .price-badge { text-transform: none; }
.price-card .plan { font-size: 14px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; color: var(--t3); margin-bottom: 14px; }
body.ja .price-card .plan { text-transform: none; }
.price-amount { font-size: 38px; font-weight: 700; letter-spacing: -1.2px; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 4px; }
.price-amount .per { font-size: 16px; font-weight: 400; color: var(--t2); letter-spacing: 0; }
.price-card .note { font-size: 14px; color: var(--t2); margin: 10px 0 22px; }
.price-card .btn { width: 100%; }
.price-legal { max-width: 760px; margin: 28px auto 0; font-size: 12px; line-height: 1.6; color: var(--t3); text-align: center; }
.price-restore { text-align: center; margin-top: 16px; }
.price-restore a { color: var(--accent); font-size: 15px; font-weight: 500; }

/* ── FAQ ── */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-top: 1px solid var(--hair); }
.faq-item:last-child { border-bottom: 1px solid var(--hair); }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 4px; cursor: pointer; font-size: 17px; font-weight: 600; letter-spacing: -0.2px; list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q .pm { width: 20px; height: 20px; flex-shrink: 0; color: var(--t3); transition: transform 200ms; }
details[open] .faq-q .pm { transform: rotate(45deg); }
.faq-a { padding: 0 4px 24px; font-size: 16px; color: var(--t2); line-height: 1.6; max-width: 60ch; }

/* ── FINAL CTA ── */
.finalcta { text-align: center; }
.finalcta h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -1.2px; margin-bottom: 28px; line-height: 1.08; }

/* ── FOOTER ── */
.footer { border-top: 1px solid var(--hair); padding: 48px 0 56px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.footer-brand .mark { width: 26px; height: 26px; border-radius: 6px; overflow: hidden; border: 1px solid var(--hair); }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; font-size: 15px; }
.footer-links a { color: var(--t2); }
.footer-links a:hover { color: var(--t1); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--hair); align-items: center; flex-wrap: wrap; }
.footer-copy { font-size: 13px; color: var(--t3); }

/* i18n visibility */
[data-en], [data-ja] { }

/* ── RESPONSIVE ── */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  /* lead with the message, THEN show the product — text stays first */
  .hero-text { order: 0; }
  .hero-art { order: 1; }
  .pillar { grid-template-columns: 1fr; gap: 32px; padding: 40px 0; }
  .pillar.flip .pillar-art { order: 0; }
  .proof { grid-template-columns: 1fr; }
  .isnt-grid { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  section { padding: 64px 0; }
  .hero { padding: 36px 0 8px; }
}
@media (max-width: 600px) {
  /* keep the whole nav on one tidy line */
  .wrap { padding: 0 18px; }
  .nav-inner { gap: 10px; height: 60px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand .mark { width: 26px; height: 26px; }
  .nav-tools { gap: 8px; margin-left: auto; }
  .langtoggle button { font-size: 12px; padding: 6px 9px; }
  .themebtn { width: 32px; height: 32px; }
  .nav .btn { font-size: 13px; padding: 8px 13px; }
  /* the product shot sits below the pitch, with breathing room */
  .hero-art { margin-top: 4px; }
  .hero .phone { width: 256px; }
  .hero-cta { gap: 14px; }
}
@media (max-width: 520px) {
  .isnt-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}
@media (max-width: 380px) {
  /* tightest phones: drop the nav CTA, the hero one still sells */
  .nav .btn-primary { display: none; }
  .phone { width: 270px; }
  .hero .phone { width: 230px; }
}
