@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/Outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* PicMyCals app theme (sampled from the app screens and App Store set) */
  --bg: #f7f6ec;
  --surface: #ffffff;
  --chip: #ebeadc;
  --ink: #1d2a18;
  --ink-2: #4c5646;
  --line: #e4e3d6;
  --green: #3c7a1c;
  --lime: #93cf52;
  --lime-hover: #86c244;
  --lime-soft: #e6f3d4;
  --flame-soft: #fdebdf;
  --flame-ink: #b04f12;

  --font: "Outfit", ui-rounded, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-h3: 1.25rem;
  --fs-h2: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --fs-h1: clamp(2.75rem, 1.6rem + 4.6vw, 4.75rem);

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --gutter: clamp(16px, 4vw, 24px);

  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --card-shadow: 0 1px 2px rgb(29 42 24 / .04), 0 8px 24px -12px rgb(29 42 24 / .14);
  --lime-glow: 0 8px 20px -8px rgb(147 207 82 / .7);
  --max: 1160px;
  --header-h: 80px;

  --dur-fast: 180ms;
  --dur-enter: 400ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; margin: 0; line-height: 1.08; letter-spacing: -0.025em; }
p, figure { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.icon { width: 1em; height: 1em; flex: none; display: inline-block; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: var(--s2); top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: var(--s1) var(--s2); border-radius: 8px;
}
.skip:focus { top: var(--s2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 48px; padding: 0 28px;
  border-radius: 999px; border: 0;
  font: 600 1rem/1 var(--font);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-fast) ease-out, box-shadow var(--dur-fast) ease-out, transform var(--dur-fast) ease-out;
}
.btn .icon { width: 20px; height: 20px; }
.btn-primary { background: var(--lime); color: var(--ink); box-shadow: var(--lime-glow); }
.btn-primary:active { transform: scale(.97); }

.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 20px 8px 16px;
  background: var(--ink); color: #fff;
  border-radius: 14px; text-decoration: none;
  transition: background-color var(--dur-fast) ease-out, transform var(--dur-fast) ease-out;
}
.store:active { transform: scale(.98); }
.store .logo { width: 26px; height: 26px; flex: none; }
.store-text { display: grid; line-height: 1.15; }
.store small { font-size: 0.75rem; opacity: .85; }
.store strong { font-size: 1.125rem; font-weight: 600; white-space: nowrap; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }

@media (hover: hover) {
  .btn-primary:hover { background: var(--lime-hover); box-shadow: 0 10px 24px -8px rgb(147 207 82 / .8); }
  .store:hover { background: #000; transform: translateY(-2px); }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(247 246 236 / .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) ease-out;
}
.site-header.is-scrolled, .site-header.is-open { border-bottom-color: var(--line); }
.header-bar { display: flex; align-items: center; gap: var(--s3); min-height: var(--header-h); }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; font-size: 1.375rem; letter-spacing: -0.02em;
}
.brand-mark { width: 38px; height: 38px; border-radius: 10px; }
.brand b { color: var(--green); font-weight: 700; }

.nav { display: flex; align-items: center; gap: var(--s4); margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: var(--s4); }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; font-weight: 500; color: var(--ink-2);
  text-underline-offset: 6px; text-decoration-thickness: 2px;
}
.nav .btn { margin-left: var(--s1); }
@media (hover: hover) { .nav-link:hover { color: var(--ink); text-decoration: underline; } }

.menu-toggle {
  display: none; place-items: center;
  width: 48px; height: 48px; margin-right: -8px;
  background: none; border: 0; border-radius: 12px; cursor: pointer;
}
.menu-toggle .bars { position: relative; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: background-color var(--dur-fast); }
.menu-toggle .bars::before, .menu-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.menu-toggle .bars::before { transform: translateY(-7px); }
.menu-toggle .bars::after { transform: translateY(7px); }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero { padding-block: var(--s6) var(--s7); }
.hero-grid {
  display: grid; gap: var(--s6); align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s1);
  background: var(--lime-soft); color: var(--green);
  font-size: var(--fs-small); font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
}
.eyebrow .icon { width: 18px; height: 18px; }
.hero h1 { font-size: var(--fs-h1); margin-top: var(--s3); }
.hero h1 .h1-line { display: block; }
.hero h1 .hl {
  background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding-inline: .04em;
}
.lede { font-size: 1.25rem; color: var(--ink-2); max-width: 44ch; margin-top: var(--s3); }
.hero .stores { margin-top: var(--s5); }

/* hero visual: live app screens in a phone, on a lime card */
.hero-visual { display: flex; justify-content: center; }
.hero-stage {
  /* sized to the viewport height so the whole phone fits above the fold */
  position: relative; width: min(100%, clamp(280px, (100svh - var(--header-h) - 120px) * .52, 420px));
  padding: 0 clamp(28px, 7%, 44px) 80px;
}
.hero-stage::before {
  content: ""; position: absolute; inset: 14% 0 0 0; z-index: 0;
  background: var(--lime); border-radius: var(--radius-xl);
  box-shadow: 0 30px 60px -30px rgb(29 42 24 / .35);
}
.phone {
  position: relative; z-index: 1;
  padding: 10px; border-radius: 52px; background: #161c13;
  box-shadow: 0 30px 60px -24px rgb(29 42 24 / .45), inset 0 0 0 2px #2d3527;
}
.phone-screen {
  position: relative; overflow: hidden; border-radius: 42px;
  aspect-ratio: 640 / 1385; background: #2a2a24;
}
.phone-screen img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 600ms var(--ease-out);
}
.phone-screen img.is-active { opacity: 1; }
.screen-steps {
  position: absolute; z-index: 2; left: 50%; bottom: 18px; translate: -50% 0;
  display: flex; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgb(255 255 255 / .9); box-shadow: var(--card-shadow);
}
.screen-steps button {
  min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink-2); font-size: .8125rem; font-weight: 600; white-space: nowrap;
  transition: background-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out;
}
.screen-steps button[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
@media (hover: hover) { .screen-steps button:not([aria-pressed="true"]):hover { color: var(--ink); background: var(--chip); } }

/* ---------- sections ---------- */
.section { padding-block: var(--s7); scroll-margin-top: var(--header-h); }
.section-head { max-width: 640px; margin-bottom: var(--s6); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p:not(.kicker) { margin-top: var(--s2); color: var(--ink-2); font-size: 1.125rem; }
.kicker { font-weight: 600; color: var(--green); font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--s2); }

/* steps */
.steps { display: grid; gap: var(--s3); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step {
  display: flex; flex-direction: column; gap: var(--s1);
  background: var(--surface); border-radius: var(--radius-lg);
  padding: var(--s4) var(--s3) var(--s3); box-shadow: var(--card-shadow);
}
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--lime); color: var(--ink); font-weight: 700; font-size: 1.125rem; line-height: 1;
}
.step h3 { font-size: var(--fs-h3); margin-top: var(--s2); }
.step p { color: var(--ink-2); max-width: 34ch; }

/* gallery */
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s6); }
.gallery-head .section-head { margin-bottom: 0; }
.gallery-nav { display: flex; gap: var(--s1); flex: none; }
.gallery-nav button {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--ink); box-shadow: var(--card-shadow); cursor: pointer;
  transition: background-color var(--dur-fast) ease-out, opacity var(--dur-fast) ease-out;
}
.gallery-nav button .icon { width: 22px; height: 22px; }
.gallery-nav button:disabled { opacity: .4; cursor: default; }
@media (hover: hover) { .gallery-nav button:not(:disabled):hover { background: var(--lime); } }

.gallery {
  --rail-pad: max(var(--gutter), (100% - var(--max)) / 2);
  display: flex; gap: var(--s3);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: var(--s1) var(--rail-pad) var(--s4);
  scroll-padding-inline: var(--rail-pad);
}
.gallery::-webkit-scrollbar { display: none; }
.shot { flex: none; width: clamp(220px, 24vw, 280px); scroll-snap-align: start; }
.shot img { width: 100%; aspect-ratio: 660 / 1434; border-radius: var(--radius-xl); box-shadow: 0 16px 32px -18px rgb(29 42 24 / .35); }
.gallery-hint { color: var(--ink-2); font-size: var(--fs-small); }

/* features */
.features { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature {
  display: flex; align-items: flex-start; gap: var(--s3);
  background: var(--surface); border-radius: var(--radius-lg);
  padding: var(--s4); box-shadow: var(--card-shadow);
}
.feature-icon {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: var(--radius);
  background: var(--lime-soft); color: var(--green);
}
.feature-icon .icon { width: 26px; height: 26px; }
.feature-icon.is-flame { background: var(--flame-soft); color: var(--flame-ink); }
.feature h3 { font-size: var(--fs-h3); line-height: 1.25; }
.feature p { color: var(--ink-2); margin-top: 6px; max-width: 44ch; }

/* download */
.download { padding-block: var(--s7); }
.download-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s5); align-items: center;
  background: var(--lime); color: var(--ink);
  border-radius: var(--radius-xl); padding: var(--s6);
}
.jools { width: 132px; aspect-ratio: 264 / 277; }
.download-card h2 { font-size: var(--fs-h2); max-width: 15ch; }
.download-card h2 em {
  font-style: normal; text-decoration: underline; text-decoration-color: var(--surface);
  text-decoration-thickness: 6px; text-underline-offset: 6px; text-decoration-skip-ink: none;
}
.download-card p { color: #24331d; margin-top: var(--s2); max-width: 42ch; font-size: 1.125rem; }
.download-card .stores { flex-direction: column; align-items: stretch; }

/* footer */
.site-footer { padding-block: var(--s5); border-top: 1px solid var(--line); }
.footer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s3); }
.footer-links a { color: var(--ink-2); text-decoration: none; display: inline-block; padding: 10px 0; }
@media (hover: hover) { .footer-links a:hover { color: var(--ink); text-decoration: underline; } }
.copy { color: var(--ink-2); font-size: var(--fs-small); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: max(var(--s4), env(safe-area-inset-bottom)); z-index: 50;
  translate: -50% 0;
  background: var(--surface); color: var(--ink); padding: 14px 22px; border-radius: 999px;
  font-size: var(--fs-small); font-weight: 600; max-width: calc(100% - 32px); text-align: center;
  box-shadow: 0 12px 30px -10px rgb(29 42 24 / .3);
  animation: toast-in 240ms var(--ease-out);
}
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* entrance */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-enter) var(--ease-out), transform var(--dur-enter) var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .toast { animation: none; }
  .btn, .store, .phone-screen img { transition: none; }
}

/* ---------- legal pages ---------- */
.legal { padding-block: var(--s6) var(--s7); }
.legal-body { max-width: 760px; }
.legal-head { margin-bottom: var(--s5); }
.legal-head h1 { font-size: var(--fs-h2); }
.legal-date { margin-top: var(--s2); color: var(--ink-2); font-size: var(--fs-small); }
.legal-body > p, .legal-body section > p { margin-top: var(--s2); }
.legal-body section { margin-top: var(--s5); }
.legal-body h2 { font-size: clamp(1.375rem, 1.2rem + .6vw, 1.625rem); line-height: 1.2; letter-spacing: -0.02em; scroll-margin-top: calc(var(--header-h) + 16px); }
.legal-body p, .legal-body li, .legal-body dd { color: var(--ink-2); }
.legal-body strong, .legal-body dt { color: var(--ink); font-weight: 600; }
.legal-body a { color: var(--green); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-body ul { margin-top: var(--s2); display: grid; gap: var(--s1); }
.legal-body ul li { position: relative; padding-left: 22px; }
.legal-body ul li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--lime);
}
.legal-list { margin: var(--s2) 0 0; }
.legal-list dt:not(:first-child) { margin-top: var(--s2); }
.legal-list dd { margin: 2px 0 0; }
.legal-summary {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--card-shadow);
  padding: var(--s4);
}
.legal-table {
  width: 100%; margin-top: var(--s3); border-collapse: separate; border-spacing: 0;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); overflow: hidden;
  font-size: var(--fs-small);
}
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 14px var(--s3); border-bottom: 1px solid var(--line); }
.legal-table tr:last-child > * { border-bottom: 0; }
.legal-table thead th { background: var(--lime-soft); color: var(--green); font-weight: 600; font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; }
.legal-table tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.legal-table td { color: var(--ink-2); }
.legal-foot { margin-top: var(--s6) !important; padding-top: var(--s3); border-top: 1px solid var(--line); }
/* unfilled details: highlighted so they can't ship unnoticed */
mark.todo { background: #fff1a8; color: var(--ink); padding: 0 .2em; border-radius: 4px; }
.footer-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

@media (max-width: 767px) {
  .legal { padding-block: var(--s5) var(--s6); }
  .legal-body section { margin-top: var(--s4); }
  .legal-summary { padding: var(--s3); }
  .legal-table thead { display: none; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; }
  .legal-table tr { padding: 14px var(--s3); border-bottom: 1px solid var(--line); }
  .legal-table tr:last-child { border-bottom: 0; }
  .legal-table th, .legal-table td { padding: 0; border: 0; }
  .legal-table tbody th { white-space: normal; }
  .legal-table td { margin-top: 2px; }
}

/* ---------- responsive ---------- */

/* Large desktop: let the hero breathe */
@media (min-width: 1600px) {
  :root { --max: 1280px; }
}

/* Tablet and below: stack hero, centre copy */
@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .hero .stores { justify-content: center; }
  .steps { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .step { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s3); row-gap: 4px; align-items: start; }
  .step-num { grid-row: span 2; }
  .step h3 { margin-top: 8px; }
  .step p { max-width: none; }
  .download-card { grid-template-columns: auto minmax(0, 1fr); padding: var(--s5); gap: var(--s4) var(--s5); }
  .download-card .stores { grid-column: 1 / -1; flex-direction: row; }
  .jools { width: 112px; }
}

/* Phones and small foldables */
@media (max-width: 767px) {
  :root { --header-h: 68px; }
  .menu-toggle { display: grid; }
  .nav { gap: var(--s1); }
  .nav .btn { margin-left: 0; min-height: 44px; padding: 0 18px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s1) var(--gutter) var(--s3);
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgb(29 42 24 / .25);
  }
  .nav-links:not(.is-open) { display: none; }
  .nav-link { min-height: 56px; font-size: 1.125rem; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav-link:last-child { border-bottom: 0; }
  .brand { font-size: 1.25rem; }
  .brand-mark { width: 34px; height: 34px; }

  .hero { padding-block: var(--s5) var(--s6); }
  .hero-stage { width: min(100%, 320px); }
  .lede { font-size: 1.125rem; }
  .hero .stores { margin-top: var(--s4); }
  .section, .download { padding-block: var(--s6); }
  .section-head, .gallery-head { margin-bottom: var(--s5); }
  .gallery-nav { display: none; }
  .gallery { gap: var(--s2); }
  .shot { width: min(68vw, 260px); }
  .features { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .steps { gap: var(--s2); }
  .feature, .step { padding: var(--s3); }
  .download-card { grid-template-columns: minmax(0, 1fr); justify-items: start; padding: var(--s5) var(--s3); border-radius: var(--radius-lg); gap: var(--s3); }
  .download-card .stores { grid-column: auto; }
  .jools { width: 96px; }
  .footer-bar { flex-direction: column; align-items: flex-start; gap: var(--s2); }
}

/* Hide "Get the app" text button on the narrowest phones so the bar never crowds */
@media (max-width: 379px) {
  .nav .btn { padding: 0 14px; font-size: .9375rem; }
  .nav .btn .icon { display: none; }
}

@media (max-width: 480px) {
  .stores { flex-direction: column; align-items: stretch; width: 100%; }
  .download-card .stores { flex-direction: column; width: 100%; }
  .store { justify-content: center; }
  .screen-steps button { padding: 0 10px; }
}

/* Short landscape screens (e.g. 1366×768 laptops): keep the phone inside the fold */
@media (min-width: 1024px) and (max-height: 820px) {
  .hero { padding-block: var(--s5) var(--s6); }
}
