/* DayGlassBar landing — dark ambient theme keyed to the app icon
   (deep navy background, a single cool-blue accent = the "sliver of light"). */

:root {
  --bg:        #090d13;
  --bg-alt:    #0c121c;
  --surface:   rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border:    rgba(255, 255, 255, 0.09);
  --text:      #e2e9f3;
  --muted:     #93a6bf;
  --accent:    #5fb0fb;
  --accent-2:  #2f7fd6;
  --radius:    14px;
  --maxw:      1080px;
  --shadow:    0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(95, 176, 251, 0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", Meiryo, system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 760px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(9, 13, 19, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand__icon { border-radius: 7px; }
.nav__links { display: flex; gap: 22px; margin-left: auto; }
.nav__links a { color: var(--muted); font-size: 0.95rem; }
.nav__links a:hover { color: var(--text); text-decoration: none; }
.lang-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.lang-toggle:hover { border-color: var(--accent); background: var(--surface-2); }

/* ============ Hero ============ */
.hero { padding: 72px 0 40px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr; /* right (demo) column is the larger one */
  gap: 16px;                        /* ~1/3 of the old 48px; freed space goes to the demo */
  align-items: center;
}
.badge {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent);
  border: 1px solid rgba(95, 176, 251, 0.35);
  background: rgba(95, 176, 251, 0.08);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 18px;
}
.hero__title {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.hero__tagline {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  color: var(--text);
  margin: 0 0 16px;
  font-weight: 500;
}
.hero__sub { color: var(--muted); font-size: 1.05rem; margin: 0 0 28px; max-width: 38ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.hero__meta { color: var(--muted); font-size: 0.92rem; }
.hero__meta .dot { margin: 0 8px; opacity: 0.5; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 11px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  color: #061018;
  background: linear-gradient(180deg, #74bbfb, var(--accent-2));
  box-shadow: 0 8px 22px rgba(47, 127, 214, 0.35);
}
.btn--primary:hover { box-shadow: 0 12px 28px rgba(47, 127, 214, 0.45); }
.btn--ghost { color: var(--text); border-color: var(--border); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); background: var(--surface-2); }
.btn__os { font-weight: 500; opacity: 0.8; font-size: 0.85rem; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* Hero art / screen mockup */
.hero__art { text-align: center; }
.screen {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0a0f17;
}
.screen__caption { color: var(--muted); font-size: 0.82rem; margin: 12px 0 0; }

/* ----- Animated desktop demo (hero) ----- */
.osd {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
}
.wallpaper {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 85% at 80% 6%, rgba(120, 170, 255, 0.28), transparent 52%),
    radial-gradient(100% 80% at 12% 100%, rgba(70, 100, 180, 0.30), transparent 60%),
    linear-gradient(155deg, #28406e 0%, #18274a 42%, #0e1a34 72%, #0a1226 100%);
}
.wallpaper::after { /* soft diagonal light streak for depth */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.05) 50%, transparent 58%);
}

/* app windows */
.win {
  position: absolute;
  background: #0d1420;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.win--editor { left: 5%; top: 12%; width: 60%; height: 62%; z-index: 1; }
.win--cal    { left: 49%; top: 30%; width: 51%; height: 54%; z-index: 2; }
.win__bar {
  height: 30px; display: flex; align-items: center; gap: 7px;
  padding: 0 12px; background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tl { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.tl--r { background: #ff5f57; }
.tl--y { background: #febc2e; }
.tl--g { background: #28c840; }
.win__title { font-size: 11px; color: var(--muted); margin-left: 6px; white-space: nowrap; overflow: hidden; }

/* editor body */
.code { display: flex; height: calc(100% - 30px); background: #0b111b; }
.gutter {
  display: flex; flex-direction: column; width: 30px; padding: 10px 0;
  text-align: center; color: rgba(255, 255, 255, 0.22);
  font: 11px/1.7 ui-monospace, monospace;
}
.lines {
  padding: 10px 12px;
  font: 12px/1.7 ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: #aebacd; white-space: nowrap;
}
.lines > div { overflow: hidden; }
.c-cm { color: #5b6b86; font-style: italic; }
.c-kw { color: #c792ea; }
.c-st { color: #c3e88d; }
.c-vr { color: #82aaff; }
.c-fn { color: #ffcb6b; }

/* calendar body */
.cal { padding: 10px 12px; height: calc(100% - 30px); display: flex; flex-direction: column; gap: 8px; }
.cal__row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.cal__t { color: var(--muted); width: 38px; flex: none; }
.cal__ev {
  flex: 1; padding: 6px 10px; border-radius: 6px; font-size: 11.5px; color: #e8f0fb;
  border-left: 3px solid; background: rgba(255, 255, 255, 0.04);
}
.ev--blue   { border-color: #5fb0fb; background: rgba(95, 176, 251, 0.14); }
.ev--violet { border-color: #b388ff; background: rgba(179, 136, 255, 0.14); }
.ev--mut    { border-color: #5b6b86; color: var(--muted); }

/* taskbar */
.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34px; z-index: 3;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: rgba(8, 12, 20, 0.72); backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.tb { width: 18px; height: 18px; border-radius: 5px; background: rgba(255, 255, 255, 0.14); flex: none; }
.tb--start { background: linear-gradient(135deg, #74bbfb, #2f7fd6); }
.tb-clock { margin-left: auto; color: #cfdcef; font-size: 12px; font-variant-numeric: tabular-nums; }

/* the DayGlassBar overlay */
.dgb {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 5;
  width: 14px;
  box-shadow: -8px 0 22px rgba(0, 0, 0, 0.40);
  transition: width 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.dgb.is-hover { width: 38%; }
.dgb__track {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(12.5% - 1px), rgba(255, 255, 255, 0.16) calc(12.5% - 1px) 12.5%),
    rgba(8, 14, 24, 0.55);
}
.dgb__fill {
  position: absolute; left: 0; right: 0;
  background: linear-gradient(180deg, #7cc0fb, #2f7fd6);
  box-shadow: 0 0 22px rgba(95, 176, 251, 0.45);
  /* top + height set by demo.js (percent) */
}
.dgb__break {
  position: absolute; left: 0; right: 0;
  background: rgba(10, 16, 26, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  /* top + height set by demo.js (percent); hidden once it has passed */
}
/* stepped mode (prefers-reduced-motion, set by demo.js): snap instead of animating */
.dgb--steps, .dgb--steps .dgb__labels { transition: none; }
.dgb__labels { position: absolute; inset: 0; opacity: 0; transition: opacity 0.35s; pointer-events: none; }
.dgb.is-hover .dgb__labels { opacity: 1; }
.dgb__edge { position: absolute; left: 12px; font-size: 12px; font-variant-numeric: tabular-nums; }
.dgb__edge--top { top: 8px; color: #dfeaf8; }
.dgb__edge--bot { bottom: 8px; color: #08131f; }
.dgb__nowtag { position: absolute; left: 12px; transform: translateY(6px); /* top set by demo.js */ }
.dgb__now { display: block; font-size: 15px; font-weight: 600; color: #08111d; }
.dgb__rem { display: block; font-size: 12px; color: #0a1726; }

/* ============ Sections ============ */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section__title { font-size: clamp(1.7rem, 3.2vw, 2.2rem); margin: 0 0 8px; letter-spacing: -0.01em; }
.section__sub { color: var(--muted); margin: 0 0 36px; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.step__num {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(95, 176, 251, 0.14);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 1.15rem; }
.step p { margin: 0; color: var(--muted); }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: rgba(95, 176, 251, 0.4); transform: translateY(-2px); }
.card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(95, 176, 251, 0.12);
  color: var(--accent);
  margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.card p { margin: 0; color: var(--muted); }

/* ============ Download ============ */
.download-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 28px; }
.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.dl-card.is-current { border-color: rgba(95, 176, 251, 0.55); box-shadow: 0 0 0 1px rgba(95, 176, 251, 0.25); }
.dl-card__os { display: flex; align-items: center; gap: 12px; color: var(--accent); margin-bottom: 4px; }
.dl-card__os h3 { margin: 0; color: var(--text); font-size: 1.3rem; }
.dl-card__note { color: var(--muted); margin: 0 0 18px; font-size: 0.95rem; }
.dl-card__btns { display: flex; flex-wrap: wrap; gap: 12px; }

.note {
  border: 1px solid rgba(95, 176, 251, 0.25);
  background: rgba(95, 176, 251, 0.06);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--muted);
  font-size: 0.95rem;
}
.note strong { color: var(--text); display: block; margin-bottom: 4px; }
.note p { margin: 0; }
.note p + p { margin-top: 6px; }
.note code { background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 5px; font-size: 0.88em; }
.all-releases { margin-top: 22px; }

/* macOS download modal (Gatekeeper workaround) */
.dl-dialog {
  margin: auto;
  width: min(480px, calc(100vw - 32px));
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}
.dl-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.dl-dialog h3 { margin: 0 0 10px; font-size: 1.2rem; }
.dl-dialog > p { margin: 0 0 16px; color: var(--muted); }
.dl-dialog ol { margin: 0 0 20px; padding-left: 1.3em; }
.dl-dialog li { margin-bottom: 12px; color: var(--text); }
.dl-dialog li:last-child { margin-bottom: 0; }
.dl-dialog__cmd {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.dl-dialog__cmd code {
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.88em;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}
.dl-dialog__cmd button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 7px;
  padding: 3px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dl-dialog__cmd button:hover { border-color: var(--accent); background: var(--surface-2); }
.dl-dialog__actions { display: flex; justify-content: flex-end; margin-top: 4px; }

/* ============ FAQ ============ */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 20px;
  margin-bottom: 12px;
  background: var(--surface);
}
.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px; top: 12px;
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 16px; color: var(--muted); }
.faq-support a { color: var(--accent); text-decoration: none; }
.faq-support a:hover { text-decoration: underline; }

/* ============ Legal (privacy page) ============ */
.legal__updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 28px; }
.legal h2 { margin: 36px 0 10px; font-size: 1.3rem; }
.legal h2:first-of-type { margin-top: 28px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.2em; margin: 0 0 8px; }
.legal li { margin-bottom: 10px; }

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 28px; background: var(--bg-alt); }
.footer__grid {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.footer__tag { color: var(--muted); margin: 0; }
.footer__links { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.footer__links a { color: var(--muted); }
/* Ko-fi support button — beige pill (brand asset), app-side dark ink so it reads on the beige. */
.footer__links a.footer__support {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #E3D6C6;
  color: #15171c;
  font-weight: 700;
  text-decoration: none;
}
.footer__links a.footer__support:hover { filter: brightness(0.95); }
.footer__support-icon { width: 22px; height: auto; display: block; }
.footer__copy { color: var(--muted); font-size: 0.85rem; margin: 24px 0 0; opacity: 0.7; text-align: center; }
.footer__copy a { color: inherit; text-decoration: none; }
.footer__copy a:hover { text-decoration: underline; }

/* ============ Language visibility helper (optional spans) ============ */
[data-lang="en"] .only-ja { display: none; }
[data-lang="ja"] .only-en { display: none; }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__sub { max-width: none; }
  .steps, .cards { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
}
@media (max-width: 560px) {
  .hero { padding: 48px 0 24px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .footer__grid { flex-direction: column; align-items: flex-start; }
  .footer__links { margin-left: 0; }
}
