/* ============================================================
   Javex Labs — shared stylesheet
   Warm, playful brand pulled from the Sudoku Mosaic app:
   cream paper background + burnt-orange accent.
   ============================================================ */

:root {
  --paper:      #fff8f0;   /* app background       */
  --paper-2:    #fdf1e3;   /* subtle warm panel    */
  --card:       #ffffff;
  --ink:        #2b2018;   /* near-black warm text */
  --ink-soft:   #6a5a4c;
  --ink-faint:  #a08d7c;
  --line:       #efe2d2;
  --orange:     #d2691e;   /* burnt orange accent  */
  --orange-2:   #e8833a;
  --orange-ink: #b8560f;
  --amber:      #f5a623;
  --green:      #6faf6b;
  --green-bg:   #e7f1e5;
  --amber-bg:   #fdf1cf;
  --red:        #e0715f;
  --red-bg:     #fbe6e2;
  --shadow:     0 10px 30px rgba(120, 72, 20, .10);
  --shadow-lg:  0 24px 60px rgba(120, 72, 20, .16);
  --radius:     18px;
  --wrap:       1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* faint sudoku-grid texture, like the app home screen */
  background-image:
    linear-gradient(rgba(210,105,30,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210,105,30,.035) 1px, transparent 1px);
  background-size: 46px 46px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--orange-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--orange);
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }

.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .85em 1.5em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: #fff;
  box-shadow: 0 8px 20px rgba(210,105,30,.32);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(210,105,30,.42); }
.btn-ghost {
  background: #fff;
  color: var(--orange-ink);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,248,240,.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: .6em; font-weight: 800; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 3px 8px rgba(120,72,20,.2); }
.brand span b { color: var(--orange); }
.brand small { display:block; font-weight:600; font-size:.62rem; letter-spacing:.18em; text-transform:uppercase; color: var(--ink-faint); margin-top:-2px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--ink-soft); font-weight: 600; font-size: .95rem;
  padding: .5em .8em; border-radius: 10px;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); text-decoration: none; }
.nav-links a.active { color: var(--orange-ink); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display:block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8em .6em; border-radius: 8px; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 48px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

.phone-frame {
  justify-self: center;
  width: min(300px, 78vw);
  border-radius: 34px;
  padding: 10px;
  background: linear-gradient(160deg, #2b2018, #4a3524);
  box-shadow: var(--shadow-lg);
}
.phone-frame img { border-radius: 26px; width: 100%; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
}

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-head { max-width: 60ch; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

.panel { background: var(--paper-2); }

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.4rem;
  background: var(--paper-2); margin-bottom: 14px;
}
.card h3 { margin-bottom: .3em; }
.card p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* ---------- App showcase card (home) ---------- */
.app-card {
  display: grid; grid-template-columns: 190px 1fr; gap: 30px;
  align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 26px; padding: 30px; box-shadow: var(--shadow);
}
.app-card .thumb {
  border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
  background: var(--paper-2);
}
.app-card .badge {
  display:inline-block; font-size:.7rem; font-weight:700; letter-spacing:.12em;
  text-transform:uppercase; color: var(--green);
  background: var(--green-bg); padding: .3em .7em; border-radius: 999px;
}
.app-card .badge.soon { color: var(--ink-faint); background: var(--paper-2); }
.app-card ul.meta { list-style:none; padding:0; margin:14px 0 20px; display:flex; flex-wrap:wrap; gap:8px; }
.app-card ul.meta li { font-size:.82rem; color:var(--ink-soft); background:var(--paper-2); border:1px solid var(--line); padding:.3em .7em; border-radius:999px; }
.app-title { display:flex; align-items:center; gap:14px; margin:.45em 0 .3em; }
.app-icon { width:54px; height:54px; border-radius:14px; box-shadow: var(--shadow); border:1px solid var(--line); flex:0 0 auto; }
.app-icon-lg { width:82px; height:82px; border-radius:20px; box-shadow: var(--shadow); border:1px solid var(--line); }
@media (max-width: 620px) { .app-card { grid-template-columns: 1fr; text-align:center; } .app-card .thumb{ max-width:200px; margin:0 auto;} .app-card ul.meta{justify-content:center;} }

/* ---------- Screenshot gallery ---------- */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: 230px;
  gap: 18px; overflow-x: auto; padding: 8px 4px 20px; scroll-snap-type: x mandatory;
}
.shots figure { margin: 0; scroll-snap-align: center; }
.shots img {
  width: 100%; border-radius: 22px; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.shots figcaption { text-align:center; font-size:.82rem; color: var(--ink-faint); margin-top: 8px; }

/* video embed (vertical YouTube Short) */
.video-embed {
  width: min(320px, 82vw);
  margin: 0 auto;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
  border: 8px solid #2b2018;
}
.video-embed .ratio {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
}
.video-embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* difficulty pills */
.diffs { display:flex; gap:14px; flex-wrap:wrap; justify-content:center; }
.diff { flex:1 1 150px; border-radius:16px; padding:20px; text-align:center; border:1px solid var(--line); }
.diff .big { font-size:1.7rem; }
.diff.easy   { background: var(--green-bg); }
.diff.medium { background: var(--amber-bg); }
.diff.hard   { background: var(--red-bg); }
.diff b { display:block; margin-top:6px; }

/* ---------- Steps (tutorial) ---------- */
.steps { counter-reset: step; display:grid; gap:18px; }
.step {
  display:grid; grid-template-columns: 52px 1fr; gap:20px; align-items:start;
  background: var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step; content: counter(step);
  width:52px; height:52px; border-radius:14px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color:#fff; font-weight:800; font-size:1.3rem;
  display:grid; place-items:center;
}
.step h3 { margin: 4px 0 .3em; }
.step p { margin:0; color: var(--ink-soft); }

.callout {
  border-left: 4px solid var(--orange);
  background: var(--paper-2);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px; margin: 22px 0;
}
.callout strong { color: var(--orange-ink); }

/* ---------- Prose (privacy / terms) ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.3em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .3em 0; }
.prose a { font-weight: 600; }
.updated { color: var(--ink-faint); font-size: .9rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(150deg, #fff3e4, #ffe6cc);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 48px; text-align: center;
  box-shadow: var(--shadow);
}
.badge-store {
  display:inline-flex; align-items:center; gap:.5em;
  padding:.7em 1.2em; border-radius:14px; background:#2b2018; color:#fff;
  font-weight:600; font-size:.9rem;
}
.badge-store:hover { text-decoration:none; opacity:.92; }
.badge-store small { display:block; font-size:.65rem; opacity:.7; font-weight:500; }

/* ---------- Contact ---------- */
.contact-grid { display:grid; grid-template-columns: 1fr 1fr; gap:24px; }
@media (max-width:620px){ .contact-grid{ grid-template-columns:1fr; } }
.contact-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:28px; box-shadow:var(--shadow); }
.contact-card .ico { font-size:1.5rem; margin-bottom:10px; }
address { font-style: normal; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  background: #2b2018;
  color: #e9dccd;
}
.site-footer a { color: #f3c99a; }
.footer-grid {
  display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap:32px;
  padding: 48px 0 30px;
}
.site-footer .brand span { color:#fff; }
.site-footer .brand small { color:#b39b84; }
.footer-col h4 { text-transform:uppercase; letter-spacing:.14em; font-size:.72rem; color:#b39b84; margin:0 0 14px; }
.footer-col a { display:block; color:#e9dccd; padding:4px 0; font-size:.95rem; }
.footer-col a:hover { color:#fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0; display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  font-size:.85rem; color:#b39b84;
}
@media (max-width:760px){ .footer-grid{ grid-template-columns:1fr; gap:24px; } }

.fade-up { opacity:0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){ .fade-up{opacity:1;transform:none;transition:none;} html{scroll-behavior:auto;} }
