/* daybox landing page (index.html only). Legal pages keep styles.css. */

@font-face {
  font-family: "DayboxSerif";
  src: url("fonts/daybox-serif.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #25211E;
  --ink2: #67615C;
  --canvas: #FAF9F6;
  --card: #FFFFFF;
  --line: #E7E4E0;
  --primary: #354962;
  --primary-top: #425771;
  --tint: #EBF1F8;
  --dusk: #2B2840;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --serif: "DayboxSerif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-synthesis: none; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: .02em;
  line-break: strict;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid #8FB0E0; outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 48px; }

/* ---------- first screen ---------- */
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  background-color: var(--dusk);
  background-image:
    linear-gradient(180deg, rgba(30, 26, 48, .58) 0%, rgba(30, 26, 48, .2) 40%, rgba(30, 26, 48, 0) 60%),
    url("img/panorama.jpg");
  background-image:
    linear-gradient(180deg, rgba(30, 26, 48, .58) 0%, rgba(30, 26, 48, .2) 40%, rgba(30, 26, 48, 0) 60%),
    -webkit-image-set(url("img/panorama.webp") type("image/webp"), url("img/panorama.jpg") type("image/jpeg"));
  background-image:
    linear-gradient(180deg, rgba(30, 26, 48, .58) 0%, rgba(30, 26, 48, .2) 40%, rgba(30, 26, 48, 0) 60%),
    image-set(url("img/panorama.webp") type("image/webp"), url("img/panorama.jpg") type("image/jpeg"));
  background-position: 0 0, center 38%;
  background-size: 100% 100%, cover;
  background-repeat: no-repeat;
}
.top {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 600; letter-spacing: .04em; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 32px; font-size: 16px; }
.nav a { color: rgba(255, 255, 255, .9); }
.nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }

.copy { position: relative; z-index: 2; text-align: center; padding: 40px 24px 0; }
/* soft scrim behind the headline block so white text keeps >= 4.5:1 over the bright sky */
.copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -40px;
  width: min(1200px, 140%);
  height: calc(100% + 110px);
  transform: translateX(-50%);
  background: radial-gradient(farthest-side, rgba(28, 24, 44, .6) 0%, rgba(28, 24, 44, .56) 66%, rgba(28, 24, 44, .22) 88%, rgba(28, 24, 44, 0) 100%);
  pointer-events: none;
}
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 64px;
  line-height: 1.25;
  letter-spacing: .02em;
  text-shadow: 0 2px 24px rgba(20, 16, 36, .35);
}
.lead {
  margin: 14px auto 0;
  max-width: 34em;
  font-size: 20px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .94);
  text-shadow: 0 1px 12px rgba(20, 16, 36, .45);
  text-wrap: balance;
  word-break: keep-all;
}
.dl { margin-top: 30px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 24px;
  border-radius: 26px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .6);
  background: rgba(40, 34, 62, .28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background .2s;
}
.btn:hover { background: rgba(255, 255, 255, .2); }
.btn-ios, [data-os="android"] .btn-mi { background: #fff; color: var(--primary); border-color: #fff; }
[data-os="android"] .btn-ios { background: rgba(40, 34, 62, .28); color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-ios:hover, [data-os="android"] .btn-mi:hover { background: #EEF2F8; }
[data-os="android"] .btn-mi { order: -1; }
.hero-note { margin-top: 14px; font-size: 15px; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 8px rgba(20, 16, 36, .55); }

.cards {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 56px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: -64px;
}
.card {
  display: block;
  width: 280px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(20, 16, 36, .18), 0 24px 60px rgba(20, 16, 36, .35);
}
.card img { width: 100%; }
.c1 { transform: rotate(-3deg) translateY(12px); }
.c2 { transform: rotate(3deg); }

.hero-qr {
  position: absolute;
  z-index: 2;
  right: max(48px, calc(50% - 552px));
  bottom: 48px;
  width: 148px;
  padding: 14px 14px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 12px 32px rgba(20, 16, 36, .28);
}
.hero-qr img { width: 104px; height: 104px; margin: 0 auto; }
.hero-qr span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--ink2); }
[data-os="ios"] .hero-qr, [data-os="android"] .hero-qr { display: none; }
@media (max-width: 1180px) { .hero-qr { display: none; } }

.bar { display: none; }

/* ---------- sections ---------- */
.sec { padding: 112px 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.share { padding-top: 160px; }
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.35;
  letter-spacing: .02em;
  color: var(--ink);
  word-break: keep-all;
  text-wrap: balance;
}
h3 { font-size: 19px; line-height: 1.5; font-weight: 600; }
.sec p { color: var(--ink2); }
.text p { margin-top: 20px; max-width: 30em; }
.sub { margin-top: 14px; }
.small { margin-top: 24px; font-size: 15px; line-height: 1.75; }
.small a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.split { display: grid; grid-template-columns: 1fr 300px; gap: 80px; align-items: center; }
.split.reverse { grid-template-columns: 300px 1fr; }
.split.reverse .text { order: 2; }

.phone {
  border-radius: 40px;
  padding: 8px;
  background: #1E1D1C;
  box-shadow: 0 1px 2px rgba(60, 45, 30, .08), 0 18px 40px rgba(60, 45, 30, .14);
}
.phone img { border-radius: 32px; width: 100%; }
figure.phone { width: 300px; }

.grid3 { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.feat .phone { max-width: 280px; margin: 0 auto; }
.feat figcaption { margin-top: 28px; }
.feat figcaption p { margin-top: 8px; font-size: 16px; line-height: 1.75; }

.facts { list-style: none; margin-top: 24px; }
.facts li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink2); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts strong { display: inline-block; min-width: 4.5em; color: var(--ink); }

.theme-list { list-style: none; margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.theme { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; min-height: 230px; }
.t-light { flex: 1; padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 8px; }
.t-light b { font-size: 24px; font-weight: 600; line-height: 1.4; }
.t-light b::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 10px; vertical-align: middle; position: relative; top: -2px; background: var(--acc); }
.t-light span { font-size: 15px; line-height: 1.65; }
.t-dark { height: 56px; position: relative; }
.t-dark::before { content: "深色"; position: absolute; left: 22px; top: 50%; transform: translateY(-50%); font-size: 14px; }
.t-plain { --bg: #FAF9F6; --fg: #25211E; --fg2: #76706C; --acc: #354962; --dbg: #161514; --dfg: #F2F0EB; }
.t-season { --bg: #F7F4EE; --fg: #1F2022; --fg2: #5F5D58; --acc: #C8402F; --dbg: #1A1D22; --dfg: #E8E6DF; }
.t-film { --bg: #EFE6D6; --fg: #3A2E25; --fg2: #716455; --acc: #C8813A; --dbg: #1E1A16; --dfg: #EDE3D2; }
.t-candy { --bg: #FFF8EE; --fg: #5C4B40; --fg2: #7C695D; --acc: #FF6B6B; --dbg: #231C18; --dfg: #F6E9DC; }
.theme .t-light { background: var(--bg); color: var(--fg); }
.theme .t-light span { color: var(--fg2); }
.theme .t-dark { background: var(--dbg); color: var(--dfg); }
.t-season b { font-family: var(--serif); }
.t-film b { letter-spacing: -.01em; font-stretch: condensed; }
.t-candy b { font-weight: 700; }

.promise { list-style: none; margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.promise li { padding: 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.promise p { margin-top: 8px; font-size: 16px; line-height: 1.75; }

.download { background: var(--tint); }
.dl-grid { margin-top: 40px; display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 40px; align-items: start; }
.dl-col h3 { margin-bottom: 14px; }
.store {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 20px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid #D9E1EC;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.store:hover { border-color: var(--primary); }
.store small { font-size: 14px; font-weight: 400; color: var(--ink2); }
.store.primary { background: linear-gradient(180deg, var(--primary-top), var(--primary)); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(53, 73, 98, .22); }
.store.primary small { color: rgba(255, 255, 255, .85); }
.store span { flex: 1; }
.store::after { content: "→"; font-weight: 400; }
.note { font-size: 15px; line-height: 1.7; }
.dl-qr { width: 180px; padding: 20px 20px 14px; border-radius: 20px; background: var(--card); border: 1px solid #D9E1EC; text-align: center; }
.dl-qr img { width: 132px; height: 132px; margin: 0 auto; }
.dl-qr span { display: block; margin-top: 8px; font-size: 15px; color: var(--ink2); }

.legal { padding: 80px 0; }
.legal h2 { font-size: 28px; }
.legal-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.legal-card { display: flex; flex-direction: column; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.legal-card:hover { border-color: var(--primary); }
.lt { font-size: 17px; font-weight: 600; color: var(--ink); }
.ld { margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--ink2); }

.site-footer { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.8; color: var(--ink2); }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; font-size: 15px; }
.footer-links a { text-decoration: none; color: var(--ink); }
.footer-links a:hover { color: var(--primary); }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .wrap { padding: 0 32px; }
  .top { padding: 0 32px; }
  h1 { font-size: 56px; }
  .grid3 { gap: 28px; }
  .theme-list, .promise, .legal-grid { grid-template-columns: repeat(2, 1fr); }
  .split { gap: 48px; grid-template-columns: 1fr 260px; }
  .split.reverse { grid-template-columns: 260px 1fr; }
  figure.phone { width: 260px; }
  .dl-grid { grid-template-columns: 1fr 1fr; }
  .dl-qr { display: none; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .stage {
    min-height: 0;
    color: #fff;
    background-color: var(--canvas);
    background-image:
      linear-gradient(180deg, rgba(30, 26, 48, .66) 0, rgba(30, 26, 48, .5) 150px, rgba(30, 26, 48, .2) 250px, rgba(30, 26, 48, 0) 330px),
      linear-gradient(180deg, rgba(250, 249, 246, 0) 420px, var(--canvas) 545px),
      url("img/panorama.jpg");
    background-image:
      linear-gradient(180deg, rgba(30, 26, 48, .66) 0, rgba(30, 26, 48, .5) 150px, rgba(30, 26, 48, .2) 250px, rgba(30, 26, 48, 0) 330px),
      linear-gradient(180deg, rgba(250, 249, 246, 0) 420px, var(--canvas) 545px),
      -webkit-image-set(url("img/panorama.webp") type("image/webp"), url("img/panorama.jpg") type("image/jpeg"));
    background-image:
      linear-gradient(180deg, rgba(30, 26, 48, .66) 0, rgba(30, 26, 48, .5) 150px, rgba(30, 26, 48, .2) 250px, rgba(30, 26, 48, 0) 330px),
      linear-gradient(180deg, rgba(250, 249, 246, 0) 420px, var(--canvas) 545px),
      image-set(url("img/panorama.webp") type("image/webp"), url("img/panorama.jpg") type("image/jpeg"));
    background-position: 0 0, 0 0, 62% 0;
    background-size: 100% 600px, 100% 600px, auto 600px;
  }
  .top { padding: 0 20px; height: 60px; }
  .nav { display: none; }
  .brand { font-size: 18px; }
  .brand img { width: 32px; height: 32px; }
  .copy { padding: 14px 20px 0; }
  h1 { font-size: min(36px, 9vw); line-height: 1.3; }
  .lead { font-size: 17px; margin-top: 10px; max-width: 19em; }
  .dl, .hero-note, .hero-qr { display: none; }
  .cards { margin: 0; padding: 28px 0 24px; gap: 0; }
  .c1 { display: none; }
  .c2 { transform: none; width: 248px; }
  .bar {
    display: block;
    position: relative;
    z-index: 3;
    padding: 20px 20px 28px;
    background: var(--canvas);
    color: var(--ink);
    text-align: center;
  }
  .from { font-size: 15px; line-height: 1.6; color: var(--ink2); }
  .bar-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--primary-top), var(--primary));
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(53, 73, 98, .22);
  }
  .bar-alt { display: inline-block; margin-top: 10px; padding: 4px 8px; font-size: 16px; color: var(--primary); }
  .bar-row { display: flex; gap: 10px; margin-top: 10px; }
  .bar-row a { flex: 1; display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 14px; border: 1px solid #CBD5E2; background: var(--card); font-size: 16px; font-weight: 600; color: var(--primary); }
  .bar-note { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--ink2); }
  .bar-ios + .bar-android { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
  [data-os="ios"] .bar-android, [data-os="android"] .bar-ios { display: none; }
  [data-os="ios"] .bar-ios + .bar-android, [data-os="android"] .bar-android { margin-top: 0; padding-top: 0; border-top: 0; }
  /* no-JS / desktop UA in a narrow window: show both, iOS first */
  .no-js .bar-android .bar-alt, [data-os="other"] .bar-android .bar-alt { display: none; }

  .sec { padding: 72px 0; }
  .share { padding-top: 72px; }
  h2 { font-size: 30px; }
  h3 { font-size: 18px; }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse .text { order: 0; }
  figure.phone { width: 250px; margin: 0 auto; }
  .grid3 { grid-template-columns: 1fr; gap: 56px; margin-top: 40px; }
  .feat .phone { max-width: 250px; }
  .theme-list { grid-template-columns: 1fr 1fr; gap: 12px; }
  .theme { min-height: 210px; }
  .t-light { padding: 16px; }
  .t-light b { font-size: 20px; }
  .t-dark { height: 44px; }
  .t-dark::before { left: 16px; font-size: 13px; }
  .promise { grid-template-columns: 1fr; gap: 12px; }
  .promise li { padding: 18px 20px; }
  .dl-grid { grid-template-columns: 1fr; gap: 28px; }
  .legal-grid { grid-template-columns: 1fr; gap: 10px; }
  .legal h2 { font-size: 24px; }
}

@media (max-width: 760px) and (max-height: 760px) {
  .c2 { width: 212px; }
  .cards { padding-top: 20px; }
}

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