/*
Theme Name: JADA
Theme URI: https://jadapps.com
Author: Drawbridges
Description: A small, fast theme for a studio that builds small, fast apps. No webfonts, no trackers, no framework — the site keeps the promise the apps make.
Version: 1.0
License: GPLv2 or later
Text Domain: jada
*/

:root {
  --ink: #14100e;
  --ink-2: #4a423d;
  --ink-3: #7a706a;
  --paper: #ffffff;
  --canvas: #faf8f6;
  --line: #e9e3de;
  --accent: #d94f04;
  --accent-ink: #b53f00;
  --accent-wash: #fff2ea;
  --radius: 16px;
  --wrap: 1120px;
  --gap: clamp(1.25rem, 3vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f7f3f0;
    --ink-2: #c3b9b2;
    --ink-3: #8d827b;
    --paper: #17130f;
    --canvas: #0e0b09;
    --line: #2b2420;
    --accent: #ff7a3d;
    --accent-ink: #ff9a68;
    --accent-wash: #241610;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .6em; font-weight: 680; }
h1 { font-size: clamp(2.25rem, 1.5rem + 3.4vw, 4rem); letter-spacing: -0.033em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem); }
h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.32rem); }
p { margin: 0 0 1.1em; }
.lede { font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); color: var(--ink-2); line-height: 1.55; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); text-decoration: none; font-size: 1.06rem; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: linear-gradient(145deg, var(--accent), #ff9a3d);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 35%, transparent);
}
.nav { margin-left: auto; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 520; }
.nav a:hover, .nav .current-menu-item > a { color: var(--ink); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .78rem 1.35rem; border-radius: 999px;
  font-weight: 620; font-size: .98rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 32%, transparent); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-3); }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---- hero ---- */
.hero { padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero .eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 640; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-wash); border-radius: 999px; padding: .38rem .85rem; margin-bottom: 1.4rem;
}
.hero h1 { max-width: 17ch; }
.hero .lede { max-width: 56ch; margin-bottom: 2rem; }

/* ---- sections ---- */
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { margin-bottom: .4em; }
.section-head p { color: var(--ink-2); margin: 0; font-size: 1.06rem; }
.section.alt { background: var(--paper); border-block: 1px solid var(--line); }

/* ---- grids and cards ---- */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
}
.section.alt .card { background: var(--canvas); }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-2); }
.card .num { font-size: .82rem; font-weight: 700; color: var(--accent-ink); letter-spacing: .06em; display: block; margin-bottom: .7rem; }

/* ---- app showcase ---- */
.app {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(1.6rem, 4vw, 3rem);
}
.app .tag { font-size: .8rem; font-weight: 660; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-ink); }
.app h2 { margin: .55rem 0 .5rem; }
.app ul { margin: 1.2rem 0 1.6rem; padding: 0; list-style: none; }
.app li { padding-left: 1.6rem; position: relative; margin-bottom: .5rem; color: var(--ink-2); }
.app li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.phone {
  justify-self: center; width: min(260px, 76%); aspect-ratio: 9 / 19;
  border-radius: 34px; border: 1px solid var(--line);
  background: linear-gradient(170deg, var(--accent-wash), var(--paper) 55%);
  box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--ink) 40%, transparent);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem; text-align: center;
}
.phone span { color: var(--ink-3); font-size: .86rem; line-height: 1.5; }

/* ---- promise strip ---- */
.promise { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.promise div { background: var(--paper); padding: 1.4rem 1.5rem; }
.promise strong { display: block; font-size: 1.02rem; margin-bottom: .25rem; }
.promise span { color: var(--ink-2); font-size: .95rem; }

/* ---- prose (privacy, support) ---- */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; color: var(--ink-2); }
.prose code { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: .12em .4em; font-size: .9em; }
.prose sup { color: var(--ink-3); }
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-bottom: .3em; }
.page-head .crumb { color: var(--ink-3); font-size: .92rem; }
.page-head .crumb a { color: var(--ink-3); }

/* ---- cta ---- */
.cta { text-align: center; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.cta h2 { max-width: 20ch; margin-inline: auto; }
.cta p { max-width: 52ch; margin-inline: auto; color: var(--ink-2); }
.cta .btn-row { justify-content: center; margin-top: 1.8rem; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2.5rem; color: var(--ink-3); font-size: .92rem; background: var(--paper); }
.site-footer .cols { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: space-between; margin-bottom: 2rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; position: fixed; background: var(--paper); padding: .7rem 1rem; border-radius: 8px; z-index: 100; }


/* ---- nav list: a menu, not a bulleted list ---- */
.nav-list { display: flex; gap: 1.4rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-list li { list-style: none; }
.site-footer .nav-list { gap: 1.2rem; }

/* ---- hero with a device ---- */
.hero-grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { order: -1; } }
.hero-art { justify-self: center; position: relative; }
.hero-art::after {
  content: ""; position: absolute; inset: -14% -18% -8%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  filter: blur(6px);
}

/* ---- device frame with a real screenshot ---- */
.device {
  width: min(268px, 78vw); aspect-ratio: 9 / 19.5; border-radius: 38px; padding: 9px;
  background: linear-gradient(160deg, #2a2320, #0d0b0a);
  box-shadow: 0 30px 70px -28px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.device img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  border-radius: 30px; display: block; background: #f2f1f4;
}
.device-row { display: flex; gap: clamp(1rem, 3vw, 2rem); flex-wrap: wrap; justify-content: center; }
.device-row .device { width: min(228px, 68vw); }
.device-sm { width: min(200px, 60vw) !important; }

/* ---- small screens ----
   The header was one unwrappable flex row, so its min-content width set a floor
   wider than a phone and every section inherited the overflow. */
@media (max-width: 700px) {
  .site-header .wrap { flex-wrap: wrap; min-height: 0; padding-block: .7rem; gap: .5rem 1rem; }
  .nav { margin-left: 0; width: 100%; }
  .nav-list { gap: 1.1rem; }
  .nav a { font-size: .92rem; }
  .hero { padding-top: 2.5rem; }
  .btn { padding: .72rem 1.15rem; font-size: .94rem; }
  .site-footer .cols { flex-direction: column; gap: 1.5rem; }
}
/* Nothing should ever be able to push the page sideways. */
html, body { max-width: 100%; overflow-x: hidden; }

/* Grid and flex children default to min-width:auto, so a child never shrinks below
   its min-content width and pushes the whole page sideways. This is the actual fix
   for the mobile overflow; the header wrap above was only half of it. */
.hero-grid > *, .grid > *, .app > *, .promise > *, .site-header .wrap > *, .device-row > * { min-width: 0; }
.wrap { max-width: 100%; }
