/* Famelo site. Colors are the app's own palette (apps/mobile/src/ui/palettes.ts). */
/* Bricolage Grotesque (SIL OFL 1.1, assets/fonts/OFL.txt), served from this site so no visitor data goes to Google. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/bricolage-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/bricolage-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --paper: #F6F8FC;
  --surface: #FFFFFF;
  --raised: #EDF2FA;
  --line: #DFE6F1;
  --ink: #14213D;
  --soft: #5E6C84;
  --blue: #1464DE;
  --blue-fill: #1769E8;
  --busy: #8A97AD;
  --hour: 48px;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101724;
    --surface: #182235;
    --raised: #1C2840;
    --line: #2D3B52;
    --ink: #EFF4FF;
    --soft: #ABBAD2;
    --blue: #79AFFF;
    --busy: #7D8BA3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101724;
  --surface: #182235;
  --raised: #1C2840;
  --line: #2D3B52;
  --ink: #EFF4FF;
  --soft: #ABBAD2;
  --blue: #79AFFF;
  --busy: #7D8BA3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
a:focus-visible, input:focus-visible + span {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 8px;
}
h1, h2 { font-weight: 750; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }

.top, main, .foot { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}
.brand img { border-radius: 10px; }
.top-links { display: flex; gap: 20px; font-weight: 550; }
.top-links a { text-decoration: none; }
.top-links a:hover { text-decoration: underline; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(28px, 6vw, 72px) clamp(56px, 8vw, 104px);
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 96;
  max-width: 13ch;
}
.lead { margin-top: 22px; color: var(--soft); font-size: 1.2rem; max-width: 34em; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.15rem;
  line-height: 1.1;
}
.store svg { width: 24px; height: 24px; fill: currentColor; }
.store small { display: block; font-size: 0.7rem; font-weight: 450; opacity: 0.8; }
.store:hover { background: var(--blue-fill); color: #fff; }

/* The visibility demo: radios drive the second phone through :has(). */
.demo {
  margin: 0;
  padding: 20px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -36px rgba(23, 105, 232, 0.45);
}
.vis { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.vis legend { font-weight: 650; margin-bottom: 12px; padding: 0; font-size: 1rem; }
.vis label { position: relative; }
.vis input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.vis span {
  display: block;
  text-align: center;
  padding: 9px 6px;
  border-radius: 10px;
  background: var(--raised);
  color: var(--soft);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 160ms, color 160ms;
}
.vis input:checked + span { background: var(--blue-fill); color: #fff; }

.days {
  display: grid;
  grid-template-columns: 22px 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.who { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 0.95rem; height: 28px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.grid, .hours {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  height: calc(12 * var(--hour)); /* 07:00 to 19:00 */
}
.grid {
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour));
}
.hours { margin-top: 28px; }
.hours li {
  position: absolute;
  top: calc((var(--s) - 7) * var(--hour) - 0.6em);
  right: 0;
  font-size: 0.75rem;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}
.ev {
  position: absolute;
  left: 0;
  right: 4px;
  top: calc((var(--s) - 7) * var(--hour) + 2px);
  height: calc((var(--e) - var(--s)) * var(--hour) - 4px);
  padding: 5px 8px 5px 10px;
  border-radius: 8px;
  border-left: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.25;
}
.ev b { display: block; font-weight: 650; }
.ev span { color: var(--soft); }
.ev.busy {
  --c: var(--busy);
  background: repeating-linear-gradient(135deg, var(--raised) 0 6px, transparent 6px 12px), var(--surface);
  color: var(--soft);
}
.lock::after { content: " · only you"; }

/* State per choice. "Just busy" is the default. */
.theirs .gift, .theirs .busy { display: none; }
.demo:has(#v-family:checked) .theirs .gift { display: block; }
.demo:has(#v-busy:checked) .theirs .busy { display: block; }
.demo:has(#v-family:checked) .lock::after { content: ""; }
.demo:has(#v-busy:checked) .lock::after { content: " · shows busy"; }

figcaption { margin-top: 14px; font-weight: 550; min-height: 1.6em; }
figcaption span { display: none; }
.demo:has(#v-family:checked) .c-family,
.demo:has(#v-only:checked) .c-only,
.demo:has(#v-busy:checked) .c-busy { display: inline; }

@media (prefers-reduced-motion: no-preference) {
  .theirs .gift, .theirs .busy { animation: appear 220ms ease-out; }
  @keyframes appear { from { opacity: 0; transform: scale(0.96); } }
}

/* Feature rows: text and a real screen, alternating sides. */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: clamp(32px, 7vw, 120px);
  align-items: center;
  padding-block: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
}
.row.flip { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.row.flip .shot { order: -1; }
.row h2, .facts h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1; }
.row p { margin-top: 16px; color: var(--soft); font-size: 1.15rem; max-width: 30em; }
.shot {
  width: 100%;
  border-radius: 38px;
  border: 8px solid var(--ink);
  background: var(--ink);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--line);
}
.facts h2 { font-size: 1.35rem; }
.facts p { margin-top: 10px; color: var(--soft); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.95rem;
}
.foot nav { display: flex; gap: 20px; }

/* Legal and help pages */
.doc { max-width: 44rem; padding-block: clamp(24px, 5vw, 56px) clamp(48px, 7vw, 88px); }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; letter-spacing: -0.03em; }
.doc .meta { margin-top: 10px; color: var(--soft); }
.doc h2 { font-size: 1.4rem; line-height: 1.2; margin-top: 2.2em; }
.doc h3 { font-size: 1.1rem; margin: 1.6em 0 0; }
.doc p, .doc ul, .doc .table { margin-top: 0.8em; }
.doc > p:first-of-type { margin-top: 1.4em; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 0.35em; }
.doc address { font-style: normal; margin-top: 0.8em; }
.table { overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 650; }
.foot a[aria-current="page"] { color: var(--ink); text-decoration: none; }

@media (max-width: 880px) {
  .hero, .row, .row.flip, .facts { grid-template-columns: minmax(0, 1fr); }
  .row.flip .shot { order: 0; }
  .shot { max-width: 300px; }
  .hero h1 { max-width: 16ch; }
}
@media (max-width: 520px) {
  :root { --hour: 38px; }
  .top-links { display: none; }
  .demo { padding: 14px; border-radius: 22px; }
  .vis span { font-size: 0.85rem; padding: 8px 4px; }
  .days { gap: 6px; grid-template-columns: 18px 1fr 1fr; }
  .ev { font-size: 0.72rem; padding: 4px 5px 4px 7px; }
}
