/* Calbook — minimal monochrome marketing site. No external requests. */

:root {
  --bg: #f3f3f3;
  --card: #ffffff;
  --ink: #111111;
  --muted: #5f5f5f;
  --line: #e3e3e3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .06);
  --radius: 20px;
  --radius-sm: 16px;
  --max: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --card: #191919;
    --ink: #f2f2f2;
    --muted: #9d9d9d;
    --line: #2b2b2b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img, svg { max-width: 100%; }
img { display: block; height: auto; }

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.022em; }
h1 { font-size: clamp(2.3rem, 6.2vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 3.8vw, 2.35rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 720px; }
.center { text-align: center; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */

.site-header { padding: 20px 0; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 9px; }

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav a {
  color: var(--muted);
  font-size: .95rem;
  text-decoration: none;
}
.nav a:hover { color: var(--ink); }
.nav .btn { color: var(--bg); }

@media (max-width: 680px) {
  .nav a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: .9; }
.btn svg { flex: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-small { padding: 9px 18px; font-size: .92rem; }

/* "Coming soon" feedback while the App Store link is still a placeholder */
.btn.is-soon::after {
  content: "Coming soon to the App Store";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 500;
  box-shadow: var(--shadow);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 14px;
}
.cta-row.center { justify-content: center; margin-top: 40px; }

.fineprint { color: var(--muted); font-size: .9rem; }

/* ---------- Hero ---------- */

.hero { padding: 32px 0 24px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}

.hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.lede {
  font-size: clamp(1.05rem, 2.1vw, 1.25rem);
  color: var(--muted);
  max-width: 34em;
}
.lede em { font-style: normal; color: var(--ink); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { justify-self: center; }
}

/* Phone mock */

.phone {
  max-width: 340px;
  margin: 0 auto;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 38px;
  box-shadow: var(--shadow);
}

.phone-screen {
  background: var(--bg);
  border-radius: 28px;
  padding: 18px 14px;
}

.chat { display: flex; flex-direction: column; gap: 10px; }

.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  line-height: 1.4;
  margin: 0;
}
.bubble.me {
  align-self: flex-end;
  background: var(--ink);
  color: var(--bg);
  border-bottom-right-radius: 6px;
}
.bubble.app {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.bubble.app strong { display: block; margin-bottom: 6px; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  padding: 2px 0;
}

.rings {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.ring {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.ring-value { font-weight: 700; font-size: .95rem; }
.ring-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section.alt { background: var(--card); }

@media (prefers-color-scheme: dark) {
  .section.alt { background: #141414; }
}

.section-title { text-align: center; }
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 34em;
  margin: 0 auto 44px;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.cards.three { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 860px) {
  .cards.three { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.section.alt .card { background: var(--bg); }
.section:not(.alt) .card { background: var(--card); }

.card p { color: var(--muted); font-size: .97rem; }

.card .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.card .icon svg { width: 22px; height: 22px; }

/* Split feature rows */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split-copy p { color: var(--muted); }
.split-copy h2 { margin-bottom: .55em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .76rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1em;
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse .split-copy { order: -1; }
}

@media (min-width: 861px) {
  .split.reverse .split-copy { order: 2; }
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.section.alt .panel { background: var(--bg); }

.panel-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  color: var(--muted);
  font-size: .95rem;
}
.panel-row strong { color: var(--ink); font-weight: 600; }
.panel-row.big { font-size: 1.05rem; padding-top: 0; }
.panel-row.big strong { font-size: 2rem; letter-spacing: -.03em; }

.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin: 6px 0 14px;
}
.bar span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }

.spark {
  width: 100%;
  height: 90px;
  margin: 10px 0 6px;
  color: var(--ink);
}

/* Steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

.step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: .95rem;
}

/* FAQ */

.faq details {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 2px 20px;
  margin-bottom: 10px;
}
.section.alt .faq details { background: var(--bg); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1;
  transition: transform .15s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; font-size: .97rem; }

/* Closer */

.closer { padding: 88px 0 96px; }
.closer h2 { margin-bottom: .35em; }
.closer .lede { margin: 0 auto 28px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  font-size: .92rem;
}

.footer-inner {
  display: grid;
  gap: 22px;
}

.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 8px; }
.footer-name { font-weight: 700; margin: 0; }
.footer-brand .muted { margin: 0; font-size: .9rem; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }

.copyright { margin: 0; font-size: .85rem; }

@media (min-width: 861px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .footer-nav { justify-content: flex-end; }
  .copyright { grid-column: 1 / -1; }
}

/* ---------- Legal pages ---------- */

.legal { padding: 24px 0 80px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin-bottom: .3em; }
.legal .effective { color: var(--muted); font-size: .92rem; margin-bottom: 2.5em; }
.legal h2 {
  font-size: 1.25rem;
  margin: 2.2em 0 .6em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
}
.legal h3 { font-size: 1.02rem; margin: 1.6em 0 .4em; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal ul { padding-left: 1.25em; margin: 0 0 1em; }
.legal li { margin-bottom: .5em; }
.legal .intro { color: var(--ink); font-size: 1.05rem; }

.legal-back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  text-decoration: none;
  font-size: .93rem;
}
.legal-back:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
