/* Calgrid site. One theme per visit (follows the system), sharp corners everywhere, one accent: highlighter lime. */
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f3f4f0; --ink: #15171c; --muted: #5a5f6b; --line: #d5d8cf; --cell: #ffffff; --head: #e9ebe4;
  --accent: #c6ee2f; --accent-ink: #15171c; --grid: rgba(21, 23, 28, .045); --shadow: rgba(21, 23, 28, .12);
}
/* light theme for everyone (owner preference) */
:root { color-scheme: light; }


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Geist", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body::before { /* spreadsheet paper */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 96px 28px;
}
a { color: inherit; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* buttons: one label per intent, sharp, physical press */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; font: 600 15px/1 "Geist", sans-serif; text-decoration: none; white-space: nowrap;
  background: var(--accent); color: var(--accent-ink); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s; cursor: pointer; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.link { font-weight: 600; text-underline-offset: 4px; }

/* nav */
nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -.01em; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links .btn { padding: 10px 16px; box-shadow: 3px 3px 0 var(--ink); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding: 40px 0 72px; min-height: calc(100dvh - 68px); }
h1 { font-size: clamp(40px, 5.2vw, 64px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 20px; font-weight: 700; }
h1 mark { background: var(--accent); color: var(--accent-ink); padding: 0 .12em; }
.sub { font-size: 19px; color: var(--muted); max-width: 30ch; margin: 0 0 32px; }

/* the live demo */
.demo { background: var(--cell); border: 1.5px solid var(--ink); box-shadow: 10px 10px 0 var(--shadow); }
.demo-tabs { display: flex; border-bottom: 1.5px solid var(--ink); background: var(--head); }
.demo-tabs button { flex: 1; padding: 10px 8px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 14px "Geist", sans-serif; cursor: pointer; }
.demo-tabs button:last-child { border-right: 0; }
.demo-tabs button[aria-selected="true"] { background: var(--cell); color: var(--ink); font-weight: 600; box-shadow: inset 0 -3px 0 var(--accent); }
.demo-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.sheet { border-right: 1.5px solid var(--ink); overflow-x: auto; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet th { background: var(--head); color: var(--muted); font: 500 11px "Geist Mono", monospace; padding: 6px; white-space: nowrap; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; }
.sheet td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; height: 40px; transition: background-color .6s; }
.sheet td:first-child { width: 26px; text-align: center; color: var(--muted); font: 11px "Geist Mono", monospace; background: var(--head); }
.sheet th:nth-child(n+3), .sheet td:nth-child(n+3) { width: 1%; }
.sheet input, .sheet select { width: 100%; height: 40px; border: 0; background: transparent; color: var(--ink); font: 13px "Geist", sans-serif; padding: 0 8px; text-overflow: ellipsis; outline: none; appearance: none; -webkit-appearance: none; cursor: pointer; }
.sheet select { font-family: "Geist Mono", monospace; font-size: 12px; padding: 0 6px; min-width: 52px; }
.sheet input:focus, .sheet select:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.sheet tr.flash td { background: var(--accent); }
.sheet tr.flash td input, .sheet tr.flash td select { color: var(--accent-ink); }

.cal { position: relative; display: grid; grid-template-columns: 36px repeat(5, minmax(0, 1fr)); font-size: 11px; user-select: none; }
.cal .day { text-align: center; padding: 6px 0; background: var(--head); border-bottom: 1px solid var(--line); color: var(--muted); font-family: "Geist Mono", monospace; }
.cal .hours { grid-column: 1; }
.cal .hour { height: 28px; color: var(--muted); font-family: "Geist Mono", monospace; text-align: right; padding-right: 6px; transform: translateY(-7px); }
.cal .lanes { grid-column: 2 / -1; position: relative; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 100% 28px, 20% 100%; }
.ev { position: absolute; left: 0; top: 0; width: 20%; padding: 3px 5px; background: var(--ink); color: var(--bg); font-size: 11px; line-height: 1.25; overflow: hidden; cursor: grab; border: 1.5px solid var(--cell); touch-action: none;
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), outline-color .6s; outline: 3px solid transparent; }
.ev:focus-visible, .ev.flash { outline-color: var(--accent); }
.ev.dragging { cursor: grabbing; transition: none; z-index: 2; opacity: .9; }
.ev small { display: block; opacity: .75; font-family: "Geist Mono", monospace; font-size: 10px; }
.demo-foot { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1.5px solid var(--ink); font-size: 13px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.status i { transition: transform .4s cubic-bezier(.16, 1, .3, 1); }
.status.pulse i { transform: rotate(180deg); }

/* sections */
section { padding: 96px 0; }
h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 28px; max-width: 18ch; }

/* before / after */
.ba { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.toggle { display: inline-flex; border: 1.5px solid var(--ink); margin-bottom: 18px; }
.toggle button { padding: 10px 16px; border: 0; background: transparent; color: var(--ink); font: 600 14px "Geist", sans-serif; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.ba-sheet { background: var(--cell); border: 1.5px solid var(--ink); }
.ba-sheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ba-sheet th, .ba-sheet td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 10px; text-align: left; }
.ba-sheet th { background: var(--head); color: var(--muted); font: 500 12px "Geist Mono", monospace; }
.ba-sheet .ugly { font-family: "Geist Mono", monospace; font-size: 12px; color: var(--muted); }
.ba-sheet input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ink); }
.ba[data-mode="calgrid"] .ugly { display: none; }
.ba-caption { margin: 14px 0 0; font-size: 18px; font-weight: 600; }

/* verbs */
.verbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--ink); background: var(--cell); }
.verb { padding: 28px; border-right: 1.5px solid var(--ink); }
.verb:last-child { border-right: 0; background: var(--accent); color: var(--accent-ink); }
.verb i { font-size: 30px; }
.verb h3 { margin: 14px 0 4px; font-size: 24px; letter-spacing: -.02em; }
.verb p { margin: 0; color: inherit; opacity: .75; }

/* pricing */
.offer { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 8px 12px; border: 1.5px solid var(--ink); margin-bottom: 22px; }
.billing { display: inline-flex; border: 1.5px solid var(--ink); margin: 0 0 26px 0; }
.billing button { padding: 9px 14px; border: 0; background: transparent; color: var(--ink); font: 600 14px "Geist", sans-serif; cursor: pointer; }
.billing button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 860px; }
.plan { background: var(--cell); border: 1.5px solid var(--ink); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.plan h3 { margin: 0; font-size: 22px; }
.price { font: 700 48px/1 "Geist", sans-serif; letter-spacing: -.03em; }
.price small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.plan li { display: flex; gap: 8px; align-items: center; }
.plan .btn { align-self: flex-start; margin-top: 6px; }
.fine { color: var(--muted); font-size: 14px; margin-top: 20px; }

/* faq */
.faq { max-width: 760px; }
details { border-top: 1.5px solid var(--ink); padding: 16px 0; }
details:last-child { border-bottom: 1.5px solid var(--ink); }
summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: "Geist Mono", monospace; }
details[open] summary::after { content: "-"; }
details p { margin: 10px 0 0; color: var(--muted); max-width: 60ch; }

footer { padding: 40px 0 56px; border-top: 1.5px solid var(--ink); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 18px 28px; justify-content: space-between; }
footer nav { height: auto; gap: 20px; flex-wrap: wrap; justify-content: flex-start; }
footer a { color: var(--muted); }

/* reveal on scroll (IntersectionObserver adds .in) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero, .ba { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
  .nav-links a:not(.btn):not(.lang) { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .demo-body { grid-template-columns: 1fr; }
  .sheet { border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .verbs, .plans { grid-template-columns: 1fr; }
  .verb { border-right: 0; border-bottom: 1.5px solid var(--ink); }
  section { padding: 64px 0; }
  .demo-foot span.hint { display: none; }
  .nav-links a.lang { display: none; }
  .nav-links .btn { padding: 9px 12px; font-size: 14px; }
  .cal { grid-template-columns: 40px repeat(5, minmax(0, 1fr)); }
  .cal .hour { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ev, .sheet td, .status i, .btn, .reveal { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
