/* ============================================================
   JoyJoy Learning Operations — Landing Page
   Static, no JavaScript, no external assets.
   ============================================================ */

:root {
  --bg:        #F8F5EF;   /* warm ivory */
  --bg-deep:   #F2ECDF;
  --ink:       #172A3A;   /* deep navy */
  --accent:    #127C78;   /* teal — operational */
  --accent-dark: #0f6863;
  --accent-soft: rgba(18, 124, 120, 0.10);
  --amber:     #D69A35;   /* warm amber — small attention */
  --muted:     #5B6B7C;
  --border:    #E7E0D5;
  --surface:   #FFFFFF;
  --radius:    12px;
  --shadow:    0 1px 3px rgba(23, 42, 58, .06), 0 4px 14px rgba(23, 42, 58, .05);
  --shadow-lift: 0 6px 24px rgba(23, 42, 58, .10), 0 2px 6px rgba(23, 42, 58, .06);
  --container: 1120px;
  --nav-h:     64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Focus visibility (keyboard) ---------- */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
  text-decoration: none;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding-block: clamp(4rem, 8vw, 6rem); }
section[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
.section-head { max-width: 720px; margin: 0 0 2.5rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 0.5rem; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.05rem); font-weight: 650; line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 2vw + 0.75rem, 2.05rem); font-weight: 650; }
h3 { font-size: 1.125rem; font-weight: 600; }
p  { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
.lead { color: var(--muted); font-size: 1.05rem; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .site-nav {
    background: rgba(248, 245, 239, 0.90);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-word {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-desc {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 150ms ease, color 150ms ease;
}
.nav-links a:hover { border-bottom-color: var(--accent); text-decoration: none; }
.nav-links .nav-cta {
  color: #fff;
  background: var(--accent);
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--accent-dark); border-bottom-color: transparent; }

/* Mobile nav: native <details> */
.nav-mobile { display: none; }
.nav-mobile details { position: relative; }
.nav-mobile summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary::after {
  content: "▾";
  margin-left: 8px;
  color: var(--muted);
}
.nav-mobile details[open] summary::after { content: "▴"; }
.nav-mobile .menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 8px 0;
  list-style: none;
  margin: 0;
}
.nav-mobile .menu a {
  display: block;
  padding: 10px 16px;
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
}
.nav-mobile .menu a:hover { background: var(--bg); color: var(--accent); text-decoration: none; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(18, 124, 120, 0.10), transparent 60%),
    radial-gradient(900px 400px at -10% 110%, rgba(214, 154, 53, 0.08), transparent 60%),
    var(--bg);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.pill {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 1.75rem;
}
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 120ms ease, box-shadow 150ms ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}
.btn-secondary {
  color: var(--accent);
  background: transparent;
  border-bottom: 1px solid var(--accent);
  border-radius: 0;
  padding: 12px 4px;
}
.btn-secondary:hover { color: var(--accent-dark); text-decoration: none; }

.trust-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 24px;
}
.trust-list li {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
.trust-list strong { color: var(--ink); font-weight: 650; }

/* ---------- Hero flow visual (SVG) ---------- */
.hero-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.flow-svg { width: 100%; height: auto; }
.flow-node-text { fill: var(--ink); font-size: 13px; font-weight: 600; }
.flow-node-sub   { fill: var(--muted); font-size: 11px; }
.flow-connector  { stroke: var(--border); stroke-width: 1.5; fill: none; }
.flow-dot        { fill: var(--accent); }
.flow-dot-amber  { fill: var(--amber); }
.flow-chip       { fill: var(--accent-soft); }
.flow-chip-amber { fill: rgba(214, 154, 53, 0.14); }
.flow-chip-text  { fill: var(--accent); font-size: 9px; font-weight: 600; text-anchor: middle; }

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
}

/* ---------- Problem cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}
.card:hover {
  border-color: rgba(18, 124, 120, 0.35);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.card-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  color: var(--accent);
}

/* ---------- Principles ---------- */
.principles-grid { gap: 18px; }
.principle-card { padding: 26px; }
.principle-icon { font-size: 1.35rem; display: block; margin-bottom: 12px; }
.principle-card h3 { margin-bottom: 6px; }

/* ---------- Services ---------- */
.service-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--amber));
  opacity: 0;
  transition: opacity 150ms ease;
}
.service-card:hover {
  border-color: rgba(18, 124, 120, 0.35);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.service-card:hover::before { opacity: 1; }
.service-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.service-card h3 { font-size: 1.15rem; margin-top: 0; }
.service-card .desc { color: var(--muted); font-size: 0.95rem; flex-grow: 1; }
.service-outcome {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.outcome-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}
.outcome-text { font-size: 0.9rem; color: var(--ink); margin: 0; }

/* ---------- Method ---------- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.method-step {
  position: relative;
  padding: 24px 24px 24px 0;
  border-top: 2px solid var(--accent);
}
.method-num {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}
.method-step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.method-step p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- Experience ---------- */
.experience-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.cap-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 24px;
}
.cap-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
}
.cap-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.about-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.about-block h3 { font-size: 1.15rem; margin-top: 0; }
.about-block p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.about-block p:last-child { margin-bottom: 0; }
.about-quote {
  font-style: italic;
  color: var(--ink) !important;
  border-left: 3px solid var(--amber);
  padding-left: 16px;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .experience-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.contact-card { max-width: 640px; }
.contact-placeholder {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-brand { color: var(--ink); font-weight: 600; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}