/* timesheepapp.com. Colours and type follow docs/brand.md and src/ui/theme.ts. Light only for
   now, like the app's screenshots. */

@font-face { font-family: Nunito; font-weight: 400; font-display: swap; src: url(/assets/fonts/nunito-400.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 600; font-display: swap; src: url(/assets/fonts/nunito-600.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(/assets/fonts/nunito-700.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(/assets/fonts/nunito-800.woff2) format('woff2'); }

:root {
  --emerald: #12744e;
  --cream: #fff8ea;
  --ink: #1f2e26;
  --ink-soft: #4a5a51;
  --surface: #ffffff;
  --line: rgba(31, 46, 38, 0.12);
  --shadow: 0 18px 40px -18px rgba(12, 60, 40, 0.35);
  --radius-card: 24px;
  --page: 1180px;
}

* { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.55 Nunito, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--emerald); font-weight: 700; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--emerald); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--ink); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a { color: var(--ink-soft); text-decoration: none; }
.nav-links a:hover { color: var(--emerald); }
.nav-links .lang { border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--ink); }
.lang-hint { background: var(--emerald); color: var(--cream); font-size: 15px; text-align: center; padding: 8px 16px; }
.lang-hint a { color: var(--cream); }
.lang-hint button { background: none; border: 0; color: var(--cream); font: inherit; margin-left: 8px; cursor: pointer; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; padding-top: 24px; padding-bottom: 72px; }
.eyebrow { color: var(--emerald); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; margin: 0 0 14px; }
h1 { font-size: clamp(40px, 5.2vw, 60px); line-height: 1.05; font-weight: 800; margin: 0 0 20px; letter-spacing: -0.02em; }
h1 em { font-style: normal; color: var(--emerald); }
.lede { font-size: 19px; color: var(--ink-soft); margin: 0 0 28px; max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--cream); border-radius: 999px;
  padding: 14px 24px; font-weight: 800; font-size: 16px; text-decoration: none;
}
.store-btn svg { width: 20px; height: 20px; fill: currentColor; }
.price-note { color: var(--ink-soft); font-size: 15px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 28px 0 0; padding: 0; list-style: none; font-weight: 700; font-size: 15px; }
.checks li::before { content: '✓'; color: var(--emerald); margin-right: 6px; font-weight: 800; }

/* The fan of phones */
.stage { position: relative; height: 760px; perspective: 1600px; }
.modes {
  position: relative; z-index: 20; display: flex; width: max-content; margin: 0 auto 4px; padding: 4px;
  background: var(--surface); border-radius: 999px; box-shadow: 0 2px 10px -4px rgba(12, 60, 40, 0.25);
}
.modes button {
  border: 0; background: none; font: 700 14px/1 Nunito, sans-serif; color: var(--ink-soft);
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
}
.modes button[aria-pressed='true'] { background: var(--emerald); color: var(--cream); }
.panel { position: absolute; inset: 330px 30px 130px 30px; border-radius: 48px; background: var(--emerald); }
.ring { position: absolute; inset: 50px 0 90px 0; transform-style: preserve-3d; touch-action: pan-y; cursor: grab; transition: opacity 0.35s; }
.ring.fading { opacity: 0; }
.phone {
  --w: 240px;
  position: absolute; left: 50%; top: 24px; margin-left: calc(var(--w) / -2);
  width: var(--w); aspect-ratio: 393 / 852;
  border-radius: calc(var(--w) * 0.155);
  padding: calc(var(--w) * 0.03);
  background: linear-gradient(145deg, #e9e6df 0%, #a9a69f 18%, #6e6c67 50%, #b7b4ad 82%, #f2efe8 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.55),
    inset 0 0 0 4px #1a1a1a,
    0 2px 2px rgba(0, 0, 0, 0.08),
    0 30px 60px -20px rgba(12, 60, 40, 0.45),
    0 60px 120px -40px rgba(12, 60, 40, 0.35);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s;
  will-change: transform;
}
.phone::before {
  content: ''; position: absolute; left: -3px; top: 22%; width: 3px; height: 9%;
  background: #8d8a84; border-radius: 3px 0 0 3px; box-shadow: 0 calc(var(--w) * 0.14) 0 #8d8a84;
}
.phone::after {
  content: ''; position: absolute; right: -3px; top: 27%; width: 3px; height: 14%;
  background: #8d8a84; border-radius: 0 3px 3px 0;
}
.phone:not(.active) { cursor: pointer; }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--w) * 0.128); background: #000; isolation: isolate; }
.phone:not(.active) .screen::after { content: ''; position: absolute; inset: 0; background: rgba(31, 46, 38, 0.12); z-index: 5; }
.status {
  position: absolute; inset: 0 0 auto 0; height: 11.5%; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; padding: 0 9% 0 11%;
  background: var(--emerald); color: var(--cream); font-weight: 700; font-size: calc(var(--w) * 0.05);
}
.screen.light .status { background: var(--cream); color: var(--ink); }
.status .icons { display: flex; gap: 5px; align-items: center; }
.status i { display: block; background: currentColor; border-radius: 2px; }
.status .bars { width: 15px; height: 9px; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.status .batt { width: 22px; height: 10px; border-radius: 3px; }
.island { position: absolute; top: 2.2%; left: 50%; transform: translateX(-50%); width: 33%; height: 4.3%; background: #000; border-radius: 999px; z-index: 3; }
.screen img { position: absolute; left: 0; top: 11.5%; width: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.glare {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.16) 45%, rgba(255, 255, 255, 0) 60%);
  background-size: 250% 250%; background-position: 50% 50%;
}
.below { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.caption { font-weight: 800; font-size: 20px; margin: 0 0 2px; min-height: 30px; }
.sub { color: var(--ink-soft); margin: 0 0 14px; min-height: 26px; font-size: 16px; }
.controls { display: flex; justify-content: center; align-items: center; gap: 14px; }
.controls button.round {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--emerald); font-size: 18px; font-weight: 800; cursor: pointer; line-height: 1;
}
.controls button.pause { font-size: 13px; }
.dots { display: flex; gap: 8px; }
.dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(18, 116, 78, 0.25); cursor: pointer; transition: width 0.3s, background 0.3s; }
.dots button[aria-current='true'] { width: 26px; background: var(--emerald); }

/* Sections */
section.block { padding-top: 56px; padding-bottom: 56px; }
h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; font-weight: 800; margin: 0 0 12px; letter-spacing: -0.01em; }
.section-lede { color: var(--ink-soft); font-size: 18px; margin: 0 0 32px; max-width: 40em; }
.modes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { background: var(--surface); border-radius: var(--radius-card); padding: 28px; }
.card h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.card .for { color: var(--emerald); font-weight: 800; font-size: 15px; margin: 0 0 14px; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li { padding: 6px 0 6px 26px; position: relative; }
.card li::before { content: '✓'; position: absolute; left: 0; color: var(--emerald); font-weight: 800; }
.reasons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.reasons .card h3 { font-size: 18px; margin-bottom: 6px; }
.reasons .card p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 20px; }
.plan { position: relative; }
.plan.best { outline: 2.5px solid var(--emerald); }
.plan .badge { position: absolute; top: -12px; left: 24px; background: var(--emerald); color: var(--cream); font-weight: 800; font-size: 13px; border-radius: 999px; padding: 3px 12px; }
.plan .price { font-size: 34px; font-weight: 800; margin: 6px 0 2px; }
.plan .price small { font-size: 16px; color: var(--ink-soft); font-weight: 600; }
.plan p { margin: 0; color: var(--ink-soft); }
.fine { color: var(--ink-soft); font-size: 14px; margin-top: 18px; max-width: 44em; }
.closing { display: flex; align-items: center; gap: 32px; background: var(--emerald); color: var(--cream); border-radius: 40px; padding: 40px; }
.closing img { width: 140px; border-radius: 32px; flex: none; }
.closing h2 { margin-bottom: 8px; }
.closing p { margin: 0 0 20px; }
.closing .store-btn { background: var(--cream); color: var(--ink); }

/* Text pages: privacy, terms, support, licenses */
.doc { max-width: 760px; padding-top: 16px; padding-bottom: 72px; }
.doc h1 { font-size: clamp(34px, 4.4vw, 46px); }
.doc h2 { font-size: 24px; margin-top: 36px; }
.doc h3 { font-size: 19px; margin: 24px 0 6px; }
.doc .updated { color: var(--ink-soft); margin-top: -8px; }
.doc li { margin: 4px 0; }
.doc .card { margin: 16px 0; }
.table-scroll { overflow-x: auto; }
table.licenses { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border-radius: 16px; overflow: hidden; }
table.licenses th, table.licenses td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.licenses th { background: rgba(18, 116, 78, 0.08); }
details { background: var(--surface); border-radius: 16px; padding: 12px 16px; margin: 10px 0; }
summary { font-weight: 700; cursor: pointer; }
pre { white-space: pre-wrap; font-size: 13px; line-height: 1.5; }

/* Footer */
footer { border-top: 1px solid var(--line); padding-top: 32px; padding-bottom: 48px; color: var(--ink-soft); font-size: 15px; }
footer .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--emerald); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-bottom: 40px; }
  .reasons { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .nav { padding-top: 16px; padding-bottom: 16px; }
  .nav-links a:not(.lang) { display: none; }
  /* The side phones peek in from the edges; clip them so the page never scrolls sideways. */
  .stage { height: 680px; overflow-x: clip; }
  .phone { --w: 210px; }
  .panel { inset: 280px 0 120px 0; }
  .modes button { padding: 9px 12px; font-size: 13px; }
  .modes-grid, .reasons, .pricing { grid-template-columns: 1fr; }
  .closing { flex-direction: column; text-align: center; padding: 32px 20px; }
  .closing img { width: 110px; }
  .closing .cta { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .phone, .ring, .dots button { transition: none; }
}
