/*
  The julula.com home page styles. The colours, fonts and sizes copy the app's theme (src/react-app/theme.css): light by
  default, dark when the device is in dark mode. The site shares no code with the app, so if the app's look changes,
  change the values in the two :root blocks below. Everything else uses these variables.
*/

@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/fonts/Nunito.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url("/fonts/DMSans.woff2") format("woff2"); }

:root {
  color-scheme: light dark;

  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-sunk: #f1f3f9;
  --tint: #f3f5fb;
  --ink: #1d2330;
  --ink-secondary: #545e72;
  --hairline: rgba(29, 35, 48, 0.09);

  --accent: #355196;
  --accent-hover: #2b4380;
  --link: #355196;
  --on-accent: #ffffff;
  --badge-bg: rgba(53, 81, 150, 0.1);
  --badge-ink: #2b4380;
  --focus: 0 0 0 4px rgba(53, 81, 150, 0.3);

  --card-border: 1px solid rgba(29, 35, 48, 0.06);
  --card-shadow: 0 1px 2px rgba(29, 35, 48, 0.04), 0 10px 30px rgba(29, 35, 48, 0.055);
  --btn-shadow: 0 4px 14px rgba(53, 81, 150, 0.24);
  --page: radial-gradient(900px 520px at 88% -10%, rgba(53, 81, 150, 0.06), transparent 70%), #fbfbfd;

  /* soft layered curves behind the first screen */
  --curve-1: rgba(53, 81, 150, 0.07);
  --curve-2: rgba(47, 164, 196, 0.1);
  --curve-3: rgba(53, 81, 150, 0.06);

  /* the colours of the account types, as in the app */
  --class-property: #b3852e;
  --class-retirement: #459d78;
  --class-investments: #5b8cdc;
  --class-vehicle: #8b7bd1;
  --class-cash-savings: #4098a1;
  --class-home-loan: #cc7467;
  --class-vehicle-finance: #bb7f57;
  --class-credit-card: #cd6e9a;
  --class-personal-loan: #b1845a;

  --font-heading: "Nunito", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --radius-card: 22px;
  --radius-control: 14px;
  --content-max: 1080px;
  --narrow-max: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090b16;
    --surface: #101729;
    --surface-sunk: #19223a;
    --tint: #0d1222;
    --ink: #eef3ff;
    --ink-secondary: #b4bfdc;
    --hairline: rgba(150, 175, 255, 0.15);

    --accent: #5272c8;
    --accent-hover: #6784db;
    --link: #9db7ff;
    --badge-bg: rgba(82, 114, 200, 0.22);
    --badge-ink: #c7d6ff;
    --focus: 0 0 0 3px rgba(103, 132, 219, 0.55);

    --card-border: 1px solid rgba(150, 175, 255, 0.16);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --btn-shadow: 0 6px 20px rgba(82, 114, 200, 0.3);
    --page: radial-gradient(900px 520px at 88% -8%, rgba(70, 110, 230, 0.17), transparent 70%),
      radial-gradient(760px 460px at -5% 105%, rgba(34, 211, 238, 0.085), transparent 70%), #090b16;

    --curve-1: rgba(82, 114, 200, 0.16);
    --curve-2: rgba(34, 211, 238, 0.09);
    --curve-3: rgba(82, 114, 200, 0.12);

    --class-property: #ffb020;
    --class-retirement: #2ee59d;
    --class-investments: #3b9cff;
    --class-vehicle: #93a0ff;
    --class-cash-savings: #22d3ee;
    --class-home-loan: #ff6b6b;
    --class-vehicle-finance: #ff9f43;
    --class-credit-card: #f472b6;
    --class-personal-loan: #e0915a;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); }
h2 { font-size: clamp(1.625rem, 4.5vw, 2.25rem); }
h3 { font-size: 1.1875rem; }
p { margin: 0 0 1rem; }

a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

img { max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: var(--narrow-max); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; border-radius: 8px; }

/* ---- buttons ---- */
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.75rem;
  border-radius: 999px;
  box-shadow: var(--btn-shadow);
}
.button:hover { background: var(--accent-hover); }
.button:focus-visible { box-shadow: var(--focus); }
.button-small { padding: 0.45rem 1.1rem; font-size: 0.9375rem; box-shadow: none; }
button.button { border: 0; font-size: 1.0625rem; cursor: pointer; }
.cta-link { color: var(--ink-secondary); font-weight: 600; }

/* ---- top bar ---- */
.top { padding: 14px 0; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo-link { display: inline-block; line-height: 0; }
.logo-link img { display: block; }
nav { display: flex; align-items: center; gap: 4px; }
.nav-link { display: none; color: var(--ink-secondary); text-decoration: none; padding: 0.45rem 0.9rem; border-radius: 999px; font-size: 0.9375rem; }
.nav-link:hover { color: var(--ink); background: var(--surface-sunk); }
@media (min-width: 640px) { .nav-link { display: inline-block; } }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; padding: 56px 0 120px; }
.curves { position: absolute; inset: auto 0 0 0; width: 100%; height: 60%; min-height: 220px; pointer-events: none; }
.curve-1 { fill: var(--curve-1); }
.curve-2 { fill: var(--curve-2); }
.curve-3 { fill: var(--curve-3); }
.hero-inner { position: relative; }
.hero-inner > * { max-width: 820px; }
.lead { font-size: clamp(1.0625rem, 2.6vw, 1.25rem); color: var(--ink-secondary); max-width: 40rem; }
.cta { margin: 1.75rem 0 0.75rem; }
.note { color: var(--ink-secondary); font-size: 0.9375rem; margin: 0; }

/* ---- sections ---- */
.section { padding: 56px 0; }
.section-tint { background: var(--tint); }
.eyebrow { color: var(--ink-secondary); font-size: 0.9375rem; margin-bottom: 1.25rem; }

.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: 56px; } }

.points li { margin: 0 0 1rem; color: var(--ink-secondary); }
.points strong { color: var(--ink); }

/* the screenshot in a simple browser frame */
.shot { margin: 0; }
.frame { background: var(--surface); border: var(--card-border); border-radius: var(--radius-card); box-shadow: var(--card-shadow); overflow: hidden; }
.frame-bar { display: flex; gap: 6px; padding: 10px 14px; background: var(--surface-sunk); }
.frame-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--hairline); }
.frame img { display: block; width: 100%; height: auto; }
figcaption { color: var(--ink-secondary); font-size: 0.875rem; margin-top: 0.75rem; text-align: center; }

/* ---- cards ---- */
.card { background: var(--surface); border: var(--card-border); border-radius: var(--radius-card); box-shadow: var(--card-shadow); padding: 24px; }
.card p { color: var(--ink-secondary); margin: 0; }
.steps, .cards-grid { display: grid; gap: 16px; margin-top: 1.5rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards-grid { grid-template-columns: repeat(4, 1fr); } }
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-bottom: 0.75rem;
  border-radius: 50%; background: var(--badge-bg); color: var(--badge-ink);
  font-family: var(--font-heading); font-weight: 800;
}
.badge { display: inline-block; background: var(--badge-bg); color: var(--badge-ink); font-size: 0.8125rem; font-weight: 600; padding: 0.15rem 0.7rem; border-radius: 999px; margin-bottom: 0.75rem; }

/* ---- account types ---- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.5rem; }
.pills li { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); border-radius: 999px; padding: 0.5rem 1rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-secondary); }
.dot-property { background: var(--class-property); }
.dot-vehicle { background: var(--class-vehicle); }
.dot-investments { background: var(--class-investments); }
.dot-retirement { background: var(--class-retirement); }
.dot-cash { background: var(--class-cash-savings); }
.dot-home-loan { background: var(--class-home-loan); }
.dot-vehicle-finance { background: var(--class-vehicle-finance); }
.dot-credit-card { background: var(--class-credit-card); }
.dot-personal-loan { background: var(--class-personal-loan); }

/* ---- FAQ ---- */
.faq { margin-top: 1.5rem; display: grid; gap: 10px; }
details { background: var(--surface); border: var(--card-border); border-radius: var(--radius-control); box-shadow: var(--card-shadow); }
summary { cursor: pointer; font-weight: 600; padding: 1rem 1.25rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--ink-secondary); font-weight: 400; font-size: 1.25rem; line-height: 1.3; }
details[open] summary::after { content: "–"; }
details p { padding: 0 1.25rem 1.1rem; margin: 0; color: var(--ink-secondary); }

/* ---- the privacy notice ---- */
.prose h2 { font-size: clamp(1.25rem, 3vw, 1.5rem); margin-top: 2.25rem; }
.prose p, .prose li { color: var(--ink-secondary); }
.prose strong { color: var(--ink); }
.bullets { margin: 0 0 1rem; padding-left: 1.2rem; list-style: disc; }
.bullets li { margin-bottom: 0.5rem; }
.callout { background: var(--surface); border: var(--card-border); border-left: 4px solid var(--accent); border-radius: var(--radius-control); padding: 16px 20px; margin: 1.5rem 0 0; }
.callout p { margin: 0; }

/* ---- the hero's "Get early access" button, which opens the form right under it ---- */
.cta-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 1.25rem; margin-top: 1.75rem; }
.cta-row .cta-link { padding-top: 0.8rem; }
/* The <details> box takes the whole row when it is open, so the form pushes the content below it down. */
.reveal { background: none; border: 0; box-shadow: none; border-radius: 0; }
.reveal[open] { flex-basis: 100%; }
.reveal[open] ~ .cta-link { display: none; }
.reveal summary.button { display: inline-block; padding: 0.8rem 1.75rem; list-style: none; }
.reveal summary.button::after { content: none; }
.reveal-body {
  margin-top: 1rem; max-width: 30rem; padding: 24px;
  background: var(--surface); border: var(--card-border); border-radius: var(--radius-card); box-shadow: var(--card-shadow);
}
.reveal-body > p { color: var(--ink-secondary); }

/* ---- early-access form ---- */
.signup { margin-top: 1rem; }
.field { margin: 0 0 1rem; }
.field-label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.4rem; }
.input {
  display: block;
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
}
.input::placeholder { color: var(--ink-secondary); opacity: 0.7; }
.input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.tick { margin: 0 0 1.25rem; color: var(--ink-secondary); font-size: 0.9375rem; }
.tick label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.tick input { flex: none; width: 1.15rem; height: 1.15rem; margin: 0.18rem 0 0; accent-color: var(--accent); }
/* Turnstile draws its own box here. The height is kept for it so the button doesn't jump when it appears. */
.cf-turnstile { min-height: 65px; }
.signup .cta { margin: 1.25rem 0 0.75rem; }
.signup .note { max-width: 30rem; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--hairline); padding: 32px 0; color: var(--ink-secondary); font-size: 0.9375rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer p { margin: 0; }
.footer-row .logo-link { margin-right: auto; }

/* ---- the small pages the Worker writes itself (not found, the sign-up replies) ---- */
.small-page main { max-width: 36rem; margin: 0 auto; padding: 64px 16px; }
.small-page .logo-link { margin-bottom: 2rem; }
.small-page p { color: var(--ink-secondary); }
.small-page .button { margin-top: 0.5rem; }
