/* Alpagua — https://alpagua.com/
   Palette straight from the logo: deep teal #0a4f4e, teal #0e7c7b,
   waves #5fb3ad & #3e9a95, cream #fbf7f0, coral accent #e9a06b. */

:root {
  --bg: #fdfaf3;
  --bg-soft: #f6efe0;
  --card: #ffffff;
  --text: #0a4f4e;
  --muted: #4d716f;
  --line: #e7dcc6;
  --teal: #0e7c7b;
  --teal-deep: #0a4f4e;
  --teal-mid: #5fb3ad;
  --teal-soft: #3e9a95;
  --accent: #e9a06b;
  --cream: #fbf7f0;
  --link: #0e7c7b;
  --shadow: 0 12px 32px rgba(10, 79, 78, .09);
  --radius: 18px;
}

html[data-theme="dark"] {
  --bg: #0c2626;
  --bg-soft: #102f2f;
  --card: #123737;
  --text: #eef7f4;
  --muted: #aac9c4;
  --line: #1f4b49;
  --link: #8fd6d1;
  --shadow: 0 12px 32px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
}
img { display: block; max-width: 100%; }
a { color: var(--link); }
.container { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
section[id] { scroll-margin-top: 84px; }
::selection { background: var(--teal-mid); color: #06302f; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Logo swap between themes (the footer always uses the dark-background version) */
.logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: block; }
.site-footer .logo-light { display: none; }
.site-footer .logo-dark { display: block; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
}
.header-inner { display: flex; align-items: center; gap: 20px; padding-block: 10px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  padding: 8px 12px;
  border-radius: 10px;
}
.nav a:hover { color: var(--teal); }
html[data-theme="dark"] .nav a:hover { color: #8fd6d1; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--teal-mid); }
.theme-toggle svg { width: 20px; height: 20px; }
.icon-sun { display: none; }
html[data-theme="dark"] .icon-sun { display: block; }
html[data-theme="dark"] .icon-moon { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s, background .16s, box-shadow .16s;
}
.btn-primary { background: var(--teal); color: var(--cream); }
.btn-primary:hover {
  background: var(--teal-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(14, 124, 123, .28);
}
html[data-theme="dark"] .btn-primary:hover { background: #17a09f; color: #07211f; }
.btn-ghost { border-color: var(--teal); color: var(--teal); background: transparent; }
.btn-ghost:hover { background: var(--teal); color: var(--cream); transform: translateY(-2px); }
html[data-theme="dark"] .btn-ghost { border-color: #4fb0aa; color: #8fd6d1; }
.btn-light { background: var(--cream); color: var(--teal-deep); }
.btn-light:hover { background: #ffffff; transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn--disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* Hero */
.hero { position: relative; padding: 92px 0 0; text-align: center; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 320px at 12% 8%, rgba(95, 179, 173, .26), transparent 62%),
    radial-gradient(760px 360px at 88% 0%, rgba(233, 160, 107, .18), transparent 62%);
}
html[data-theme="dark"] .hero::before {
  background:
    radial-gradient(620px 320px at 12% 8%, rgba(95, 179, 173, .12), transparent 62%),
    radial-gradient(760px 360px at 88% 0%, rgba(233, 160, 107, .08), transparent 62%);
}
.hero .container { position: relative; }
.hero-logo { height: 132px; width: auto; margin: 0 auto 30px; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 3.7rem); margin: 0 0 18px; }
/* A box of its own, so that its lines come out even ("Ollama." never alone). */
.hero h1 .accent { color: var(--teal); display: inline-block; text-wrap: balance; }
html[data-theme="dark"] .hero h1 .accent { color: #79cfc9; }
.lead {
  max-width: 760px;
  margin: 0 auto 30px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
}
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin: 20px 0 0; font-size: .9rem; color: var(--muted); }
.waves { display: block; width: 100%; height: 96px; margin-top: 64px; }
.waves .w1 { fill: var(--teal-mid); opacity: .5; }
.waves .w2 { fill: var(--teal-soft); opacity: .75; }
@media (prefers-reduced-motion: no-preference) {
  .hero-logo { animation: bob 5s ease-in-out infinite; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Providers strip */
.providers { border-block: 1px solid var(--line); padding: 28px 0; background: var(--bg); }
.strip-label {
  margin: 0 0 14px;
  text-align: center;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pill {
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 16px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 500;
  font-size: .95rem;
}
.pill--accent { border-color: var(--teal-mid); color: var(--teal); }
html[data-theme="dark"] .pill--accent { color: #8fd6d1; }

/* Sections */
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--invert { background: var(--teal-deep); color: var(--cream); }
.section--teal { background: linear-gradient(180deg, var(--teal) 0%, var(--teal-deep) 100%); color: var(--cream); }
.section-head { max-width: 780px; margin: 0 auto 52px; text-align: center; padding-inline: 24px; }
.kicker {
  display: block;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
}
html[data-theme="dark"] .kicker { color: #79cfc9; }
.section--invert .kicker, .section--teal .kicker { color: var(--accent); }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: .35em 0 .4em; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.06rem; }
.section--invert .section-head p, .section--teal .section-head p { color: #cfe5e0; }

/* Screenshots carousel: a track that scrolls sideways and snaps on each
   screenshot, portrait or landscape (--ratio, width / height, set by the
   page); as high as the window allows, never wider than a phone's. */
.carousel { position: relative; }
.carousel-track {
  position: relative;
  display: flex; align-items: flex-end; gap: 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding: 8px 4px 26px;
  scrollbar-width: thin;
  scrollbar-color: var(--teal-mid) transparent;
}
.carousel-track:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.shot { flex: none; margin: 0; scroll-snap-align: start; }
.shot img {
  aspect-ratio: var(--ratio);
  height: min(560px, 72vh, calc((100vw - 64px) / var(--ratio)));
  width: auto;
  max-width: none;
  border: 4px solid var(--teal-deep);
  border-radius: 16px;
  background: var(--bg-soft);
  box-shadow: 0 6px 18px rgba(10, 79, 78, .18);
}
html[data-theme="dark"] .shot img { border-color: var(--teal-soft); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.shot figcaption {
  margin-top: 12px;
  text-align: center;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 500;
  color: var(--muted);
}
.shot figcaption::first-letter { text-transform: uppercase; }
.carousel-btn {
  position: absolute;
  top: calc(50% - 40px);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .15s, border-color .15s, opacity .15s;
}
.carousel-btn[hidden] { display: none; }
.carousel-btn:hover:not(:disabled) { transform: scale(1.06); border-color: var(--teal-mid); }
.carousel-btn:disabled { opacity: 0; pointer-events: none; }
.carousel-btn svg { width: 22px; height: 22px; }
.carousel-prev { left: -10px; }
.carousel-next { right: -10px; }

/* Feature cards */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); }
.card .icon { display: inline-flex; margin-bottom: 12px; color: var(--teal); }
.card h3 { margin: 0 0 8px; font-size: 1.22rem; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }

/* Privacy checklist (dark teal section) */
.check-list { list-style: none; margin: 0 auto; padding: 0; max-width: 840px; display: grid; gap: 16px; text-align: left; }
.check-list li {
  position: relative;
  background: rgba(251, 247, 240, .07);
  border: 1px solid rgba(251, 247, 240, .16);
  border-radius: 14px;
  padding: 18px 22px 18px 60px;
}
.check-list li::before {
  content: "✓";
  position: absolute; left: 20px; top: 19px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #402414;
  font-weight: 700;
  font-size: .85rem;
  display: grid; place-items: center;
}
.check-list strong { display: block; font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; font-size: 1.08rem; margin-bottom: 3px; }
.check-list p { margin: 0; color: #cfe5e0; font-size: .95rem; }

/* Wave dividers */
.wave { line-height: 0; }
.wave svg { display: block; width: 100%; height: 64px; }
.wave .wa { fill: var(--teal-mid); opacity: .55; }
.wave--to-invert { background: var(--bg-soft); }
.wave--to-invert .wb { fill: var(--teal-deep); }
.wave--from-invert { background: var(--teal-deep); }
.wave--from-invert .wb { fill: var(--bg); }
.wave--to-download { background: var(--bg); }
.wave--to-download .wb { fill: var(--teal); }

/* Tools */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  transition: transform .16s, border-color .16s;
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--teal-mid); }
.tool-card .t-icon { display: inline-flex; color: var(--teal); }
.tool-card h3 { font-size: 1.02rem; margin: 8px 0 4px; }
.tool-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.tools-note { text-align: center; margin: 32px 0 0; color: var(--muted); }
.tools-note strong { color: var(--teal); }
html[data-theme="dark"] .tools-note strong { color: #8fd6d1; }

/* MCP */
.mcp { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.mcp > div:first-child h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin: .3em 0 .5em; }
.mcp > div:first-child > p { color: var(--muted); margin: 0 0 6px; }
.mcp-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 13px; }
.mcp-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.mcp-list .dot { flex: none; margin-top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.mcp-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.mc-head {
  background: var(--teal-deep);
  color: var(--cream);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
}
.mc-badge { font-size: .72rem; background: var(--teal-soft); padding: 3px 10px; border-radius: 999px; letter-spacing: .04em; }
.mcp-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.mcp-row:last-child { border-bottom: none; }
.tn { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.st-on { color: var(--teal); font-weight: 600; font-size: .8rem; }
html[data-theme="dark"] .st-on { color: #8fd6d1; }
.st-ask { color: #c97f3f; font-weight: 600; font-size: .8rem; }
html[data-theme="dark"] .st-ask { color: var(--accent); }
.st-off { color: var(--muted); font-size: .8rem; }
.mcp-cap { margin: 14px 0 0; font-size: .9rem; color: var(--muted); }

/* A guide of a release, shown by read.php: a column of text. */
.doc { max-width: 800px; padding-block: 48px 64px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin: 0 0 20px; }
.doc h2 { font-size: 1.55rem; margin: 40px 0 12px; scroll-margin-top: 84px; }
.doc h3 { font-size: 1.2rem; margin: 28px 0 8px; }
.doc a { color: var(--link); }
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .9em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .35em;
}
.doc pre {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  overflow-x: auto;
  line-height: 1.5;
}
.doc pre code { background: none; border: 0; padding: 0; font-size: .88rem; }
.doc table { border-collapse: collapse; margin: 16px 0; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.doc th { background: var(--bg-soft); }
.doc li { margin: 4px 0; }
.doc-back { margin-top: 48px; }

/* Download */
/* Six cards: three by row on a wide screen, two, then one; never five and
   one alone (a card at least 280 px wide, four of them never fit). */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.plat {
  background: rgba(251, 247, 240, .08);
  border: 1px solid rgba(251, 247, 240, .18);
  border-radius: var(--radius);
  padding: 26px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
.plat .p-icon { display: inline-flex; height: 36px; align-items: center; }
.plat h3 { margin: 0; font-size: 1.3rem; }
.plat .formats { margin: 0; color: #cfe5e0; font-size: .92rem; min-height: 1.5em; }
.plat .formats a { color: #fff; font-weight: 600; }
.plat .sums { margin: 0; color: #cfe5e0; font-size: .78rem; }
.plat .sums a { color: #cfe5e0; }
.plat .guide { color: #fff; font-size: .88rem; }
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #402414;
}
.badge--soon {
  background: transparent;
  border: 1.5px solid rgba(251, 247, 240, .45);
  color: #e6f4f1;
  font-weight: 600;
}
.plat .btn { margin-top: 6px; }
.download-note { text-align: center; margin: 38px auto 0; max-width: 720px; color: #cfe5e0; }
.download-note a { color: #fff; font-weight: 600; }

/* iOS beta invitation: a popover, centered over a dimmed page */
.popup {
  max-width: min(460px, calc(100vw - 32px));
  padding: 28px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}
.popup::backdrop { background: rgba(6, 48, 47, .55); }
.popup h3 { margin: 0 0 10px; font-size: 1.35rem; }
.popup p { margin: 0 0 12px; }
.popup-small { color: var(--muted); font-size: .9rem; }
.popup-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 56px 18px 22px;
  position: relative;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-family: "Fredoka", system-ui, sans-serif;
  color: var(--teal);
}
html[data-theme="dark"] .faq summary::after { color: #8fd6d1; }
.faq details[open] summary { color: var(--teal); }
html[data-theme="dark"] .faq details[open] summary { color: #8fd6d1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* Footer */
.site-footer { background: #07211f; color: #9dc3bd; padding: 60px 0 34px; text-align: center; }
.footer-logo { height: 56px; width: auto; margin: 0 auto 16px; }
.footer-tag { font-family: "Fredoka", system-ui, sans-serif; font-weight: 500; color: #d8efeb; margin: 0 0 20px; }
.footer-links { display: flex; gap: 10px 28px; justify-content: center; flex-wrap: wrap; margin: 0 0 24px; padding: 0; list-style: none; }
.site-footer a { color: #d8efeb; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-links .dim { color: #7fa9a3; }
.footer-small { font-size: .85rem; color: #7fa9a3; margin: 6px 0 0; }
.footer-small a { text-decoration: underline; }

@media (max-width: 980px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 900px) {
  .mcp { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .hero { padding-top: 64px; }
  .hero-logo { height: 104px; }
  .check-list li { padding: 16px 18px 16px 54px; }
}

/* Inline SVG icons (Material + brand) */
.ic { flex: none; }
.card .icon .ic { width: 28px; height: 28px; }
.tool-card .t-icon .ic { width: 22px; height: 22px; }
.plat .p-icon .ic { width: 34px; height: 34px; }
html[data-theme="dark"] .card .icon,
html[data-theme="dark"] .tool-card .t-icon { color: #8fd6d1; }
