/* Cybee's List website. Colours are the app's own: the teal bar, berry totals and the row tints of each list. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --teal: #00c4ce;
  --teal-ink: #006a73;
  --lagoon: #08434a;
  --berry: #961654;
  --page: #ffffff;
  --ink: #08434a;
  --ink-soft: #3d6a70;
  --line: #d3e8ea;
  --bar-text: #ffffff;

  --tint-shopping: #ffe1f1;  --badge-shopping: #e8336f;
  --tint-todo: #d4f7e3;      --badge-todo: #1f9d55;
  --tint-budget: #dcf8fa;    --badge-budget: #0098a6;
  --tint-tracking: #fff1c2;  --badge-tracking: #f08a1c;
  --tint-savings: #e5f6d8;   --badge-savings: #3f8f2a;
  --tint-smart: #fbe4ef;     --badge-smart: #961654;

  --display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, sans-serif;
  --gutter: 16px;
  --measure: 66ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d2326;
    --ink: #e6f6f7;
    --ink-soft: #a5c6ca;
    --line: #23464b;
    --teal-ink: #5fe3ea;
    --tint-shopping: #3a1426;
    --tint-todo: #113a26;
    --tint-budget: #0f3a40;
    --tint-tracking: #3b2f0e;
    --tint-savings: #1d3714;
    --tint-smart: #3d0f25;
  }
  .bar { background: #00838c; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--berry); }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; }
h2 { font-size: clamp(1.6rem, 6vw, 2.25rem); font-weight: 750; letter-spacing: -0.01em; margin-bottom: 0.6em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: var(--measure); }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
main > section { margin-block: 56px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--berry); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* ---- The teal bar, like the app's navigation bar with its large title ---- */
.bar { background: var(--teal); color: var(--bar-text); padding-top: env(safe-area-inset-top); }
.bar__inner {
  max-width: 1080px;
  margin-inline: auto;
  padding: 10px max(var(--gutter), env(safe-area-inset-right)) 22px max(var(--gutter), env(safe-area-inset-left));
}
.bar__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.bar__nav a { color: var(--bar-text); text-decoration: none; }
.bar__home { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.bar__home img { border-radius: 7px; }
.bar__nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.bar__nav li a { display: block; padding: 8px 10px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; }
.bar__nav li a:hover { background: rgb(255 255 255 / 0.18); }
.bar__nav li a[aria-current="page"] { background: rgb(255 255 255 / 0.25); }
.bar__nav :focus-visible { outline-color: #fff; }
.bar__title {
  margin-top: 18px;
  font-size: clamp(2.6rem, 12vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 96;
}
@media (max-width: 420px) {
  .bar__home span, .bar__nav li a { font-size: 0.9rem; padding-inline: 8px; }
}

/* ---- Intro ---- */
.intro { display: grid; gap: 32px; align-items: center; margin-top: 32px; }
.lede { font-size: clamp(1.25rem, 4.6vw, 1.6rem); line-height: 1.4; font-weight: 500; }
.store {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px;
  background: #000; color: #fff; border-radius: 12px; font-weight: 700; text-decoration: none;
}
.store:hover { background: var(--berry); color: #fff; }
@media (prefers-color-scheme: dark) { .store { background: #fff; color: #000; } }
.intro__meta { margin-top: 12px; font-size: 0.9rem; color: var(--ink-soft); }
.intro__phone { width: min(300px, 78vw); margin-inline: auto; filter: drop-shadow(0 24px 30px rgb(8 67 74 / 0.25)); }
@media (min-width: 760px) {
  .intro { grid-template-columns: 1.2fr 1fr; }
  .intro__phone { width: 330px; margin-top: -120px; }
}

/* ---- What's inside: tinted rows with initials, like the lists in the app ---- */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-radius: 18px; overflow: hidden; }
.row { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 16px; background: var(--tint); }
.row h3 { margin-bottom: 4px; }
.row p { margin: 0; color: var(--ink-soft); }
.row__badge {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--badge); color: #fff; font-weight: 700;
}
.row--shopping { --tint: var(--tint-shopping); --badge: var(--badge-shopping); }
.row--todo     { --tint: var(--tint-todo);     --badge: var(--badge-todo); }
.row--budget   { --tint: var(--tint-budget);   --badge: var(--badge-budget); }
.row--tracking { --tint: var(--tint-tracking); --badge: var(--badge-tracking); }
.row--savings  { --tint: var(--tint-savings);  --badge: var(--badge-savings); }
.row--smart    { --tint: var(--tint-smart);    --badge: var(--badge-smart); }
@media (min-width: 760px) {
  .rows { grid-template-columns: 1fr 1fr; }
}

/* ---- Screenshot strip, swiped sideways like the App Store ---- */
.hint { color: var(--ink-soft); margin-top: -0.4em; }
.shots__strip {
  list-style: none; margin: 0; padding: 8px max(var(--gutter), calc((100vw - 1080px) / 2 + var(--gutter))) 20px;
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100vw - 1080px) / 2 + var(--gutter)));
  scrollbar-width: thin;
}
.shots__strip li { flex: 0 0 min(62vw, 240px); scroll-snap-align: start; }
.shots__strip figure { margin: 0; }
.shots__strip img { filter: drop-shadow(0 12px 16px rgb(8 67 74 / 0.18)); }
.shots__strip figcaption { margin-top: 12px; font-size: 0.95rem; line-height: 1.45; color: var(--ink-soft); }
.shots__strip figcaption strong { display: block; color: var(--ink); }

/* ---- Two short notes side by side on wide screens ---- */
.split { display: grid; gap: 8px 48px; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }

/* ---- Privacy summary in the app's berry, like the Smart Budget card ---- */
.privacy-card { background: var(--berry); color: #fff; border-radius: 24px; padding-block: 32px; max-width: calc(1080px - 2 * var(--gutter)); width: calc(100% - 2 * var(--gutter)); }
.privacy-card a { color: #fff; font-weight: 700; }
.privacy-card a:hover { color: #ffd1e6; }
.privacy-card :focus-visible { outline-color: #fff; }

.checks { list-style: none; margin: 0 0 1.2em; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 34px; max-width: var(--measure); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.2em; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid currentColor;
  background: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' fill='none' stroke='%2300c4ce' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---- Developer ---- */
.developer { display: grid; gap: 20px; align-items: start; }
.developer img { border-radius: 22px; }
@media (min-width: 760px) { .developer { grid-template-columns: 96px 1fr; gap: 28px; } }

/* ---- Privacy policy ---- */
.policy { margin-block: 32px 64px; }
.policy > * { max-width: var(--measure); }
.policy h2 { margin-top: 1.8em; font-size: clamp(1.4rem, 5vw, 1.8rem); }
.policy h3 { margin: 1.4em 0 0.4em; }
.policy__updated { color: var(--ink-soft); font-size: 0.95rem; }
.policy__summary { background: var(--tint-budget); border-radius: 20px; padding: 22px 20px 6px; margin-top: 24px; }
.policy__summary h2 { margin-top: 0; }
.policy ul:not(.checks) { padding-left: 1.2em; }
.policy ul:not(.checks) li { margin-bottom: 0.5em; }
.perms { margin: 0 0 1em; }
.perms dt { font-weight: 700; margin-top: 1em; }
.perms dd { margin: 0.2em 0 0; }

/* ---- Footer ---- */
.foot { background: var(--lagoon); color: #d9eef0; margin-top: 72px; padding-bottom: env(safe-area-inset-bottom); }
.foot__inner { max-width: 1080px; margin-inline: auto; padding: 32px var(--gutter) 40px; }
.foot p { display: flex; align-items: center; gap: 12px; }
.foot img { border-radius: 10px; }
.foot ul { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: #fff; font-weight: 600; }
.foot a:hover { color: var(--teal); }
.foot :focus-visible { outline-color: var(--teal); }
.foot__small { font-size: 0.85rem; color: #9fc4c8; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
