/* Gapsi public pages. No external resources: fonts are served from /fonts (GDPR). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

/* Same neutrals as the app's Light appearance; the hero uses the app icon's colors. */
:root {
  --page: #f4f5f7;
  --card: #ffffff;
  --ink: #12141a;
  --muted: #566073;
  --line: #e2e5eb;
  --link: #2a52d6;
  --night: #14213d;
  --night-ink: #eef2fb;
  --night-muted: #a7b4d1;
  --you: #6c9bff;
  --marco: #b79cff;
  --sara: #ffc052;
  --free: #3ddbb0;
  --on-color: #14213d;
  --lesson: #dce4f5;
  --busy: #e3e6ec;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e1015;
    --card: #171a22;
    --ink: #f2f4f8;
    --muted: #9ea6b8;
    --line: #262a35;
    --link: #8fabff;
    --lesson: #25304a;
    --busy: #262a35;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--card);
  padding: 8px 12px;
}
.skip:focus {
  left: 16px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and footer ------------------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 700 1.375rem/1 var(--display);
  letter-spacing: -0.01em;
}
.brand picture,
.brand img {
  display: block;
  width: 40px;
  height: 40px;
}

.lang {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
}

.foot {
  margin-top: 96px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}
.foot p {
  margin: 0 0 12px;
  max-width: 60ch;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.foot a {
  color: var(--ink);
}

/* Landing ---------------------------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero {
  display: grid;
  gap: 40px;
  padding: 24px 0 8px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  line-height: 0.98;
  max-width: 11ch;
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.55;
  margin: 20px 0 28px;
  max-width: 36ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--page);
  font-weight: 600;
  text-decoration: none;
}
.button:hover {
  opacity: 0.88;
}

.note {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0;
  max-width: 30ch;
}

/* The day: the app icon unfolded into a real Wednesday. Columns are people, blocks their
   commitments, and the band across them is the time everyone is free. */
.day-figure {
  margin: 0;
}

.day {
  background: var(--night);
  color: var(--night-ink);
  border-radius: 28px;
  padding: 20px 20px 24px;
}

.day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.day-head h2 {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}
.day-head span {
  color: var(--night-muted);
  font-size: 0.875rem;
}

.people,
.lanes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-left: 40px;
}
.people {
  margin-bottom: 10px;
  font-size: 0.875rem;
  font-weight: 600;
}
.people li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.people ul,
ul.people {
  padding: 0;
  margin-top: 0;
}
.people li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}

.grid {
  position: relative;
  height: 400px;
}

.hours {
  position: absolute;
  inset: 0 auto 0 0;
  width: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--night-muted);
  font-size: 0.75rem;
}
.hours li {
  position: absolute;
  top: var(--y);
  transform: translateY(-50%);
}

.lanes {
  position: absolute;
  inset: 0 0 0 0;
}
.lane {
  position: relative;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.block {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--top);
  height: var(--h);
  padding: 7px 8px;
  border-radius: 12px;
  background: var(--c);
  color: var(--on-color);
  font-size: 0.8125rem;
  line-height: 1.2;
  overflow: hidden;
}
.block b {
  display: block;
  font-weight: 600;
  hyphens: manual;
}
.block span {
  display: block;
  font-size: 0.6875rem;
  opacity: 0.8;
  white-space: nowrap;
}

.band {
  position: absolute;
  left: 40px;
  right: 0;
  top: 50%;
  height: 16.67%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--free);
  color: var(--on-color);
  font-size: 0.9375rem;
  box-shadow: 0 0 0 4px var(--night);
}
.band b {
  font-weight: 600;
}

.caption {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 14px 4px 0;
  max-width: 46ch;
}

@media (prefers-reduced-motion: no-preference) {
  .block {
    animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--n) * 90ms + 150ms);
  }
  .band {
    animation: sweep 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.85s both;
    transform-origin: left center;
  }
  .band > * {
    animation: appear 0.3s ease-out 1.4s both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes sweep {
  from {
    transform: scaleX(0);
  }
}
@keyframes appear {
  from {
    opacity: 0;
  }
}

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

.section {
  margin-top: 104px;
}
.section > h2,
.split h2 {
  font-size: clamp(1.9rem, 5.5vw, 2.75rem);
  line-height: 1.05;
  max-width: 18ch;
}
.section-intro {
  margin: 16px 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.125rem;
}

.split {
  display: grid;
  gap: 32px;
  align-items: start;
}

/* Who sees what: the same lesson seen by two friends. */
.views {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
}
.view {
  display: flex;
  flex-direction: column;
  padding: 20px 18px 22px;
}
.view + .view {
  border-left: 1px solid var(--line);
}
.view h3 {
  font-family: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0;
  margin-bottom: 4px;
}
.view p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.875rem;
}
.slot {
  margin-top: auto;
  border-radius: 12px;
  padding: 12px;
  min-height: 92px;
  font-size: 0.9375rem;
  line-height: 1.3;
}
.slot b {
  display: block;
  font-weight: 600;
}
.slot span {
  font-size: 0.875rem;
  color: var(--muted);
}
.slot.details {
  background: var(--lesson);
}
/* Stripes as well as the word: the difference never relies on color alone. */
.slot.busy {
  background: repeating-linear-gradient(135deg, var(--busy) 0 10px, transparent 10px 20px), var(--card);
  border: 1px solid var(--line);
}

.facts {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
}
.facts li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.facts li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--free);
  transform: translateY(-1px);
}

/* Features as a plain two-column list. */
.features {
  display: grid;
  gap: 0 48px;
  margin: 36px 0 0;
}
.features div {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.features dt {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 4px;
}
.features dd {
  margin: 0;
  color: var(--muted);
  max-width: 42ch;
}

/* Real screens from the app (demo accounts). */
.screens {
  display: flex;
  gap: 20px;
  margin: 36px -20px 0;
  padding: 0 20px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.screens figure {
  flex: none;
  width: min(68vw, 280px);
  margin: 0;
  scroll-snap-align: start;
}
.screens img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  aspect-ratio: 390 / 844;
  object-fit: cover;
  background: var(--card);
}
.screens figcaption {
  margin-top: 10px;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Questions. */
.faq {
  margin-top: 28px;
  max-width: 720px;
}
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 36px 18px 0;
  position: relative;
  font-weight: 600;
  font-size: 1.125rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font: 400 1.5rem/1 var(--text);
  color: var(--muted);
}
.faq details[open] summary::after {
  content: "–";
}
.faq details p {
  margin: 0 0 20px;
  max-width: 60ch;
  color: var(--muted);
}

.join {
  margin-top: 104px;
  padding: 36px 24px;
  border-radius: 28px;
  background: var(--card);
}
.join h2 {
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  line-height: 1.1;
  max-width: 20ch;
}
.join p {
  margin: 14px 0 24px;
  max-width: 54ch;
  color: var(--muted);
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1fr 1.05fr;
    gap: 64px;
    padding-top: 48px;
  }
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
  .grid {
    height: 440px;
  }
  .block {
    padding: 8px 10px;
    font-size: 0.875rem;
  }
  .block span {
    font-size: 0.75rem;
  }
  .band {
    font-size: 1rem;
  }
  .features {
    grid-template-columns: 1fr 1fr;
  }
  .screens {
    margin: 36px 0 0;
    padding: 0 0 8px;
  }
  .screens figure {
    /* A slice of the fourth screen shows that the row scrolls. */
    width: 29%;
  }
  .join {
    padding: 48px;
  }
}

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

.doc {
  max-width: 70ch;
  padding-top: 16px;
}
.doc h1 {
  font-size: clamp(2.1rem, 6vw, 3rem);
  line-height: 1.05;
}
.doc h2 {
  font-size: 1.375rem;
  margin: 40px 0 8px;
  letter-spacing: -0.01em;
}
.doc .meta {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 12px 0 32px;
}
.doc p,
.doc li {
  line-height: 1.65;
}
.doc ul {
  padding-left: 1.2em;
}
.doc li + li {
  margin-top: 6px;
}
.doc .box {
  background: var(--card);
  border-radius: 20px;
  padding: 4px 22px;
  margin: 20px 0;
}
.doc .basis {
  color: var(--muted);
  font-style: italic;
}
.doc .other-lang {
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
