/* ============================================================
   OSO Organised — design system + site styles
   Fonts: Outfit (Google Fonts). No JS frameworks, no build tools.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand colours */
  --oso-dark-purple: #101585;   /* primary: headers, CTA buttons, bottom banner */
  --oso-orange: #FEB555;        /* accent / highlight */
  --oso-pink: #CA90AF;          /* dividers, secondary accents, selected state on purple */
  --oso-light-purple: #a0a1ce;  /* highlighted / callout backgrounds */
  --oso-grey: #E0E0E0;          /* card borders */
  --oso-light-grey: #F9F9F9;    /* card backgrounds */
  --white: #ffffff;

  /* Roles */
  --text: var(--oso-dark-purple);
  --bg: var(--white);

  /* Type scale (Outfit) — presets from the OSO design system */
  --preset-1: 400 clamp(2rem, 1.4rem + 2.6vw, 2.5rem)/1.05 "Outfit", system-ui, sans-serif; /* 40px hero/page headings */
  --preset-2: 400 clamp(1.5rem, 1.2rem + 1.4vw, 1.75rem)/1.1 "Outfit", system-ui, sans-serif; /* 28px sub-headings */
  --preset-3: 600 1.25rem/1.15 "Outfit", system-ui, sans-serif;  /* 20px smaller headings */
  --preset-3b: 700 1.25rem/1.15 "Outfit", system-ui, sans-serif; /* 20px emphasised */
  --preset-4: 400 1rem/1.5 "Outfit", system-ui, sans-serif;      /* 16px body */

  /* Spacing / layout */
  --container: 1120px;
  --radius: 14px;
  --gap: clamp(1rem, 0.6rem + 2vw, 2rem);
  --section-y: clamp(3rem, 2rem + 5vw, 5.5rem);
  --bottom-bar-h: 64px;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: var(--preset-4);
  color: var(--text);
  background: var(--bg);
  padding-bottom: var(--bottom-bar-h);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul[class] { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--oso-orange); outline-offset: 2px; border-radius: 4px; }

/* ---------- Typography helpers ---------- */
h1, .preset-1 { font: var(--preset-1); letter-spacing: 0; }
h2, .preset-2 { font: var(--preset-2); letter-spacing: 0; }
h3, .preset-3 { font: var(--preset-3); }
.preset-3b { font: var(--preset-3b); }
.lead { font-size: 1.125rem; line-height: 1.6; max-width: 60ch; }
.muted { color: #4b4d8a; }
strong, b { font-weight: 700; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 0.5rem + 3vw, 2rem); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--oso-light-grey); }
.section--callout { background: var(--oso-light-purple); }
.section--purple { background: var(--oso-dark-purple); color: var(--white); }
.section--divider { border-top: 3px solid var(--oso-pink); }
.section__head { max-width: 60ch; margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.section__head p { margin-top: 0.75rem; }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: var(--preset-3);
  font-size: 1rem;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--oso-dark-purple);
  background: var(--oso-dark-purple);
  color: var(--white);
  cursor: pointer;
  transition: transform .08s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { background: #0b0f66; }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--oso-orange); border-color: var(--oso-orange); color: var(--oso-dark-purple); }
.btn--accent:hover { background: #f4a63c; }
.btn--ghost { background: transparent; color: var(--oso-dark-purple); border-bottom-color: var(--oso-orange); }
.btn--ghost:hover { background: rgba(16, 21, 133, 0.08); }
.btn--on-purple { background: var(--oso-orange); border-color: var(--oso-orange); color: var(--oso-dark-purple); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ---------- Header ---------- */
.site-header { background: var(--oso-dark-purple); color: var(--white); border-bottom: 3px solid var(--oso-pink); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 46px; width: auto; }
.site-nav { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: clamp(0.75rem, 0.3rem + 1.5vw, 1.75rem); margin: 0; }
.nav-menu a { text-decoration: none; color: var(--white); font-size: 0.975rem; padding: 0.4rem 0; }
.nav-menu a:hover { color: var(--oso-orange); }
.nav-menu a[aria-current="page"] { color: var(--oso-pink); font-weight: 700; }
.nav-menu .nav-cta { color: var(--oso-dark-purple); padding: 0.55rem 1.1rem; }
.nav-menu .nav-cta:hover { color: var(--oso-dark-purple); }
.nav-toggle {
  display: none;
  font: var(--preset-3); font-size: 0.95rem;
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.5); border-radius: 999px;
  padding: 0.4rem 0.9rem; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--oso-dark-purple);
    padding: 0.5rem clamp(1rem, 0.5rem + 3vw, 2rem) 1.25rem;
    border-top: 3px solid var(--oso-pink);
  }
  .nav-menu[hidden] { display: none; }
  .nav-menu li { border-bottom: 1px solid rgba(255,255,255,0.12); }
  .nav-menu a { display: block; padding: 0.85rem 0; }
  .nav-menu .nav-cta { text-align: center; margin-top: 0.85rem; }
  .site-nav { position: static; }
  .site-header__inner { position: relative; }
}

/* ---------- Hero ---------- */
.hero { background: #ffffff; color: var(--oso-dark-purple); }
.hero__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--gap); align-items: center; padding-block: clamp(2.5rem, 1.5rem + 6vw, 5rem); }
.hero h1 { max-width: 18ch; }
.hero p { margin-top: 1rem; color: var(--oso-dark-purple); font-size: 1.125rem; line-height: 1.6; max-width: 46ch; }
.hero .btn-row { margin-top: 1.75rem; }
.hero__note { margin-top: 1rem; font-size: 0.9rem; color: var(--oso-pink); }
.hero__media img { border-radius: var(--radius); background: var(--oso-light-purple); border: 3px solid var(--oso-pink); }
/* Real app screenshots are tall (portrait) photos inside these landscape
   frames. Fit the whole screen without cropping or stretching it; object-fit
   letterboxes it, centred, inside a fixed-height band so the frame keeps its
   original footprint and nothing on the page jumps while images load. */
.hero__media picture,
.split__media picture { display: contents; }
.hero__media img,
.split__media img { width: 100%; height: clamp(260px, 38vw, 420px); object-fit: contain; }
@media (max-width: 820px) { .hero__inner { grid-template-columns: 1fr; } .hero__media { order: -1; } }

/* ---------- Stat bar ---------- */
.statbar { background: var(--oso-pink); color: var(--oso-dark-purple); }
.statbar__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); padding-block: clamp(1.75rem, 1rem + 3vw, 2.75rem); text-align: center; }
.statbar__grid strong { display: block; font: var(--preset-2); }
.statbar__grid span { font-size: 0.95rem; }
.statbar__note { text-align: center; font-size: 0.8rem; padding-bottom: 1rem; opacity: 0.85; }
@media (max-width: 720px) { .statbar__grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards / feature grid ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--oso-light-grey);
  border: 1px solid var(--oso-grey);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
}
.card h3 { margin-bottom: 0.5rem; }
.card p { margin-bottom: 0.75rem; }
a.card__link { font-weight: 700; text-decoration: none; color: var(--oso-dark-purple); border-bottom: 2px solid var(--oso-orange); }
a.card__link:hover { border-color: var(--oso-dark-purple); }
.card--step { position: relative; }
.card--step .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 999px;
  background: var(--oso-pink); color: var(--white);
  font-weight: 700; margin-bottom: 0.75rem;
}

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel__track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: min(300px, 78vw);
}
@media (min-width: 720px) { .carousel__track > * { width: calc(50% - var(--gap) / 2); } }
@media (min-width: 1000px) { .carousel__track > * { width: calc(33.333% - var(--gap) * 2 / 3); } }
.carousel__nav { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 1.5rem; }
.carousel__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 999px; padding: 0;
  border: 2px solid var(--oso-dark-purple); background: var(--white); color: var(--oso-dark-purple);
  font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.carousel__btn:hover { background: var(--oso-light-grey); }
.carousel__btn:disabled { opacity: 0.35; cursor: default; }
.carousel__dots { display: flex; align-items: center; gap: 0.5rem; }
.carousel__dot {
  width: 0.6rem; height: 0.6rem; border-radius: 999px; border: none; padding: 0;
  background: var(--oso-grey); cursor: pointer;
}
.carousel__dot[aria-current="true"] { background: var(--oso-dark-purple); }
@media (prefers-reduced-motion: reduce) { .carousel__track { scroll-behavior: auto; } }

/* ---------- Split (alternating image / text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
.split + .split { margin-top: var(--section-y); }
.split:nth-of-type(even) .split__media { order: 2; }
.split__media img { border-radius: var(--radius); border: 1px solid var(--oso-grey); background: var(--oso-light-grey); }
.split__body h3 { font: var(--preset-2); margin-bottom: 0.75rem; }
.split__body ul { margin-top: 1rem; padding-left: 1.1rem; }
.split__body li { margin-top: 0.4rem; }
@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; }
  .split:nth-of-type(even) .split__media { order: 0; }
}

/* ---------- Testimonials ---------- */
.quote {
  background: var(--white);
  border: 1px solid var(--oso-grey);
  border-left: 4px solid var(--oso-pink);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.quote p { font-size: 1.05rem; line-height: 1.55; }
.quote footer { margin-top: 1rem; font-weight: 700; font-size: 0.95rem; }
.placeholder-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; background: var(--oso-light-purple); color: var(--oso-dark-purple);
  padding: 0.2rem 0.55rem; border-radius: 999px; margin-bottom: 0.75rem;
}

/* ---------- CTA banner (repeated in-page) ---------- */
.cta-banner { background: var(--oso-light-purple); color: var(--white); text-align: center; }
.cta-banner .container { padding-block: var(--section-y); }
.cta-banner h2 { max-width: 24ch; margin-inline: auto; }
.cta-banner p { margin: 0.75rem auto 1.5rem; max-width: 48ch; color: #e7e8ff; }

/* ---------- Signup form ---------- */
.signup { display: grid; gap: 0.75rem; max-width: 460px; }
.signup .field { display: grid; gap: 0.35rem; }
.signup label { font-weight: 700; font-size: 0.95rem; }
.signup input {
  font: var(--preset-4); padding: 0.75rem 0.9rem;
  border: 1px solid var(--oso-grey); border-radius: 10px; background: var(--white); color: var(--text);
}
.signup .form-note { font-size: 0.85rem; color: #4b4d8a; margin: 0; }
.on-purple .signup input { border-color: transparent; }
.on-purple .signup .form-note { color: var(--oso-pink); }
.on-purple .signup label { color: var(--white); }

/* ---------- Article / blog ---------- */
.article { max-width: 720px; margin-inline: auto; }
.article p, .article ul, .article ol { margin-top: 1rem; line-height: 1.65; }
.article h2 { font: var(--preset-2); margin-top: 2.25rem; }
.article h3 { margin-top: 1.5rem; }
.article ul, .article ol { padding-left: 1.25rem; }
.article li { margin-top: 0.4rem; }
.article__meta { color: #4b4d8a; font-size: 0.9rem; margin-top: 0.75rem; }
.article blockquote {
  margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--oso-light-grey);
  border-left: 4px solid var(--oso-orange); border-radius: 8px;
}

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--oso-grey); border-radius: 10px;
  background: var(--oso-light-grey); padding: 0.25rem 1rem; margin-top: 0.75rem;
}
.faq summary { font-weight: 700; cursor: pointer; padding: 0.85rem 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 0.85rem; margin: 0; }

/* ---------- Post list ---------- */
.post-list { display: grid; gap: var(--gap); }
.post-list article { border-bottom: 1px solid var(--oso-grey); padding-bottom: var(--gap); }
.post-list h3 { font: var(--preset-2); }
.post-list a { text-decoration: none; }
.post-list a:hover h3 { color: #0b0f66; }
.post-list time { display: block; color: #4b4d8a; font-size: 0.9rem; margin: 0.35rem 0 0.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--oso-dark-purple); color: var(--white); padding-block: var(--section-y) 1.5rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--oso-orange); }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--gap); }
.site-footer__inner img { height: 58px; width: auto; margin-bottom: 0.25rem; }
.site-footer h2 { font: var(--preset-3); font-size: 1rem; margin-bottom: 0.75rem; color: var(--oso-pink); }
.site-footer ul { display: grid; gap: 0.5rem; }
.site-footer p { color: #e7e8ff; margin-top: 0.75rem; font-size: 0.95rem; }
.site-footer .copyright { margin-top: 2rem; font-size: 0.85rem; color: var(--oso-pink); }
@media (max-width: 780px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ---------- Fixed bottom CTA bar ---------- */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--oso-dark-purple); color: var(--white);
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: 0.6rem 1rem; min-height: var(--bottom-bar-h);
  border-top: 3px solid var(--oso-pink);
}
.cta-bar p { margin: 0; font-weight: 700; }
.cta-bar .btn { padding: 0.55rem 1.1rem; }
@media (max-width: 480px) { .cta-bar p { font-size: 0.9rem; } .cta-bar .btn { font-size: 0.9rem; padding: 0.5rem 0.9rem; } }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 0.5rem; top: -3rem; background: var(--oso-orange); color: var(--oso-dark-purple);
  padding: 0.5rem 0.9rem; border-radius: 8px; font-weight: 700; text-decoration: none; transition: top .15s ease; z-index: 100;
}
.skip-link:focus { top: 0.5rem; }

/* ---------- Utilities ---------- */
.text-accent { color: var(--oso-orange); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
