/* Sleepy Coffee — sleepycoffee.app
   Same world as the 2.1 App Store screenshots: the night sky over bedtime,
   the app's own cream by day, and one accent, the caffeine amber.
   Night at both ends of the page, the app's light screens in between. */
:root {
  --sky: #070a18;
  --cream: #f7f2e9;       /* store screenshot background */
  --toast: #efe5d3;       /* panel tiles, one step darker than the page */
  --card: #fffae7;        /* the app's card cream */
  --ink: #283333;         /* text */
  --ink2: #565e5e;        /* secondary text, AA on cream and toast */
  --amber: #f5ad46;       /* the one accent: the caffeine curve's color */
  --on-sky: rgba(255, 255, 255, 0.8);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Inter", "PingFang SC",
    "Hiragino Sans GB", "Segoe UI", system-ui, "Microsoft YaHei", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; background: var(--sky); }
body { overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.55 var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
h1, h2 { text-wrap: balance; }
.nb { white-space: nowrap; }

/* ---------- night sky ---------- */
.sky {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(7, 10, 24, 0.6) 0, rgba(7, 10, 24, 0) 38%, rgba(247, 242, 233, 0) 86%, var(--cream) 100%),
    url(/assets/sky.webp) 50% 100% / cover no-repeat,
    var(--sky);
}
.top { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; }
.wordmark { font-weight: 750; font-size: 19px; letter-spacing: -0.01em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.wordmark img { width: 32px; height: 32px; border-radius: 8px; }
.wordmark b { color: var(--amber); font-weight: 750; }
.lang { font-size: 15px; display: flex; gap: 4px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; padding: 3px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.lang > * { padding: 5px 12px; border-radius: 999px; text-decoration: none; }
.lang [aria-current] { background: rgba(255, 255, 255, 0.9); color: var(--ink); font-weight: 650; }
.lang a { color: var(--on-sky); }
.lang a:hover { color: #fff; }

.hero { text-align: center; padding: 64px 0 0; }
.hero h1 {
  font-size: clamp(2.6rem, 6.6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
  max-width: 13ch;
  margin: 0 auto 22px;
  text-shadow: 0 2px 30px rgba(7, 10, 24, 0.5);
}
:lang(zh) .hero h1 { letter-spacing: 0.01em; line-height: 1.14; max-width: none; }
.hero .sub { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--on-sky); max-width: 36ch; margin: 0 auto 28px; }
:lang(zh) .hero .sub { max-width: 26em; }
.badge { display: inline-block; padding: 12px; } /* clear space ≥ ¼ badge height */
.badge img { height: 48px; width: auto; }

/* signature: the real dark-mode caffeine card, hanging over the horizon into the day */
.hero-card { width: min(520px, 86vw); margin: 44px auto 0; position: relative; }
.hero-card::before { /* amber glow of the curve, on the horizon */
  content: ""; position: absolute; inset: 18% -18% -6%; z-index: 0;
  background: radial-gradient(closest-side, rgba(245, 173, 70, 0.42), rgba(245, 173, 70, 0));
  filter: blur(10px);
}
.hero-card img {
  position: relative; z-index: 1; border-radius: 13.4%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 80px -20px rgba(7, 10, 24, 0.75), 0 18px 30px -12px rgba(7, 10, 24, 0.5);
}
.hero-card figcaption { position: relative; z-index: 1; font-size: 15px; color: var(--ink2); font-weight: 500; margin: 18px 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .hero-card img { animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) 0.15s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(28px); } }
}

/* ---------- day: four store-style panels ---------- */
main { padding: 88px 0 24px; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--toast); border-radius: 36px; overflow: hidden; display: flex; flex-direction: column; min-height: 640px; position: relative; }
.panel .copy { padding: 40px 40px 0; position: relative; z-index: 1; }
.panel h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 10px; }
:lang(zh) .panel h2 { letter-spacing: 0.01em; line-height: 1.2; }
.panel p { margin: 0; color: var(--ink2); max-width: 34ch; }
.panel p.req { font-size: 14px; margin-top: 10px; }
.panel .art { margin-top: auto; padding: 32px 40px 0; position: relative; z-index: 1; }
.panel-card .art { padding-bottom: 40px; }
.panel-card .art img { width: 100%; border-radius: 13.4%; box-shadow: 0 1px 0 #fff inset, 0 30px 60px -28px rgba(80, 52, 20, 0.45), 0 10px 20px -12px rgba(80, 52, 20, 0.25); }
.panel-card:nth-child(2) .art img { transform: rotate(1.5deg); }
.panel-card:nth-child(1) .art img { transform: rotate(-1.5deg); }

/* photo: the store's sunlit café table behind the real Add sheet */
.panel-phone { background: var(--toast) url(/assets/morning.webp) 50% 70% / cover; }
.panel-phone::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(239, 229, 211, 0.97) 0, rgba(239, 229, 211, 0.9) 34%, rgba(239, 229, 211, 0) 62%); }
.panel-phone .art { display: flex; justify-content: center; }
.panel-phone .art img { width: min(64%, 300px); border-radius: 30px 30px 0 0; box-shadow: 0 0 0 7px #1c1c1c, 0 30px 60px rgba(40, 25, 10, 0.4); margin-top: 7px; }

/* widgets: the real Home Screen, rising from the panel's edge */
.panel-home .art { display: flex; justify-content: center; height: 420px; overflow: hidden; padding-top: 7px; }
.panel-home .art img { width: min(70%, 330px); align-self: flex-start; border-radius: 12px 12px 0 0; box-shadow: 0 0 0 7px #1c1c1c, 0 30px 60px rgba(40, 25, 10, 0.3); }

.pro {
  display: inline-block; vertical-align: 0.35em; margin-right: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 0; line-height: 1; color: #7a4a12;
  padding: 6px 12px 7px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 236, 205, 0.7));
  border: 1px solid #fff;
  box-shadow: inset 0 -3px 8px rgba(245, 173, 70, 0.35), 0 4px 12px rgba(120, 80, 30, 0.16);
}

/* ---------- night again: download + footer ---------- */
.night {
  color: #fff; margin-top: 72px;
  background:
    linear-gradient(180deg, rgba(7, 10, 24, 0.35), rgba(7, 10, 24, 0) 40%),
    url(/assets/sky-b.webp) 50% 30% / cover no-repeat,
    var(--sky);
}
.get { text-align: center; padding: 120px 0 64px; }
.get h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.04em; font-weight: 800; margin: 0 0 14px; }
:lang(zh) .get h2 { letter-spacing: 0.01em; }
.get p { color: var(--on-sky); max-width: 44ch; margin: 0 auto 22px; }
:lang(zh) .get p { max-width: 28em; }
.get .note { font-size: 14px; color: rgba(255, 255, 255, 0.62); margin: 26px auto 0; max-width: 60ch; }
footer { border-top: 1px solid rgba(255, 255, 255, 0.14); padding: 24px 0 40px; font-size: 15px; color: var(--on-sky); display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer span { margin-right: auto; }
footer a:hover { color: #fff; }

/* ---------- support page ---------- */
.sky-short { padding-bottom: 110px; background-position: 0 0, 50% 85%, 0 0; }
.page-head { max-width: 720px; padding: 40px 0 0; }
.page { max-width: 720px; padding: 8px 0 72px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.04em; line-height: 1.05; font-weight: 800; margin: 0 0 12px; }
.page-head .lede { color: var(--on-sky); font-size: 1.12rem; margin: 0 0 32px; }
.contact { background: var(--card); border-radius: 28px; padding: 28px 30px; margin-bottom: 44px; box-shadow: 0 1px 0 #fff inset, 0 24px 48px -30px rgba(80, 52, 20, 0.4); }
.contact p { margin: 0 0 6px; }
.contact p:last-child { margin: 0; color: var(--ink2); }
.contact a.mail { font-size: 1.3rem; font-weight: 750; color: var(--ink); text-decoration-color: var(--amber); text-decoration-thickness: 2px; }
.page h2 { font-size: 1.35rem; margin: 0 0 8px; letter-spacing: -0.015em; }
details { border-top: 1px solid #e3d8c4; padding: 16px 0; }
details:last-of-type { border-bottom: 1px solid #e3d8c4; }
summary { cursor: pointer; font-weight: 650; }
details p { color: var(--ink2); margin: 10px 0 0; }
.night-short { margin-top: 0; padding-top: 24px; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .panels { grid-template-columns: 1fr; }
  .panel { min-height: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 36px; }
  .panel { border-radius: 28px; }
  .panel .copy { padding: 30px 26px 0; }
  .panel .art { padding: 26px 26px 0; }
  .panel-card .art { padding-bottom: 28px; }
  .panel-home .art { height: 360px; }
  .get { padding-top: 88px; }
  .lang > * { padding: 5px 10px; }
}

/* ---------- more of the app: a swipeable row of real screens ---------- */
.gallery { padding: 96px 0 0; }
.gallery h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.035em; font-weight: 800; margin: 0 auto 28px; }
:lang(zh) .gallery h2 { letter-spacing: 0.01em; }
.strip {
  list-style: none; margin: 0; display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px max(20px, (100% - 1120px) / 2) 48px; scroll-padding-inline: max(20px, (100% - 1120px) / 2);
  scrollbar-width: thin; scrollbar-color: #d9cdb6 transparent;
}
.strip:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.strip li { flex: 0 0 auto; width: 250px; scroll-snap-align: start; }
.strip img { width: 100%; border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1px rgba(40, 51, 51, 0.06), 0 26px 50px -26px rgba(80, 52, 20, 0.45); }
@media (max-width: 560px) {
  .gallery { padding-top: 72px; }
  .strip { gap: 14px; }
  .strip li { width: 66vw; }
}
