:root {
  --bg: #ffffff; /* light background */
  --card: #ffffff; /* white panels */
  --text: #0f172a; /* slate-900 */
  --muted: #64748b; /* slate-600 */
  --accent: #22c55e; /* green-500 */
  --border: #a7f3d0; /* soft green border */
  --badge: #ecfdf5; /* green-50 */
  --good: #16a34a; /* green-600 */
  --gap: 16px; /* base spacing for grids */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* header height */
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 600px at 50% -200px, #e8f9ef 0%, var(--bg) 60%, #f7fff9 100%);
  font: 400 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 72px;
  display: grid;
  align-items: center;
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.2) blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}
.brand-name { font-size: 18px; line-height: 1; }
.brand-logo { height: 36px; width: auto; border-radius: 8px; border: 1px solid var(--border); background: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
/* Consistent styled symbol boxes */
.logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #f0fdf4;
  border: 1px solid var(--border);
  color: #16a34a;
  font-size: 18px;
}
.brand .logo { box-shadow: 0 2px 8px rgba(0,0,0,.25); }

.site-nav {
  display: flex;
  gap: clamp(12px, 2.5vw, 24px);
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  transition: color 120ms ease, background-color 120ms ease;
}

.site-nav a:hover {
  color: var(--text);
  background: #ecfdf5;
}

.site-nav .btn.small { padding: 6px 10px; border: 2px solid var(--border); }
.site-nav .btn.small.lang { padding: 6px 8px; }
.lang-switch { display: inline-flex; gap: 6px; }
.lang-flag { width: 18px; height: 12px; border-radius: 2px; display: block; }
.lang-switch .btn[aria-pressed="true"] { background: #dcfce7; border-color: #86efac; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  color: #166534;
  text-decoration: none;
  background: #f0fdf4;
  border: 2px solid var(--border);
  transition: transform 160ms cubic-bezier(.2,.7,.2,1), background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  font-weight: 600;
}

.btn:hover {
  transform: scale(1.1);
  background: #dcfce7;
  /* Deep ambient + soft accent glow + subtle inner highlight (not a border) */
  box-shadow:
    0 22px 56px rgba(0,0,0,.20),
    0 0 26px rgba(34,197,94,.25),
    inset 0 0 0 1px rgba(255,255,255,.06);
}
.btn.primary:hover {
  transform: scale(1.12);
  box-shadow:
    0 26px 64px rgba(0,0,0,.25),
    0 0 34px rgba(34,197,94,.35),
    inset 0 0 0 1px rgba(255,255,255,.08);
}
.btn:active { transform: scale(0.96); }
.btn:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 60%, transparent); outline-offset: 2px; }
.btn.primary { background: linear-gradient(90deg, #22c55e 0%, #16a34a 60%, #15803d 100%); color: #ffffff; border: 0; font-weight: 700; text-shadow: 0 1px 0 rgba(0,0,0,.15), 0 2px 10px rgba(0,0,0,.15); }
.btn.primary:hover { filter: brightness(1.05); }

.badge {
  display: inline-block;
  padding: 8px 14px;
  background: var(--badge);
  color: #065f46;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  margin-bottom: 18px;
}
.badge .i-badge { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; vertical-align: -4px; margin-right: 10px; }

/* Sections */
.site-content {
  padding-top: 8px;
}

.section {
  padding: clamp(12px, 3vw, 24px) 0;
}

.image-section img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 2px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  background: var(--card);
}

/* Hero */
.hero {
  position: relative;
  min-height: clamp(520px, 70vh, 760px);
  display: grid;
  align-items: center;
  background:
    /* Light overlay (much less photo visibility) */
    linear-gradient(180deg, rgba(255,255,255,.52), rgba(255,255,255,.82)),
    /* Subtle radial green tint (even stronger) */
    radial-gradient(1200px 600px at 50% -200px, rgba(209,250,229,.45), rgba(209,250,229,.30) 60%, transparent 75%),
    /* Background image */
    url('img/learning.jpeg') center/cover no-repeat;
  background-blend-mode: normal, normal, normal;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 56px;
  pointer-events: none;
  /* Soft fade to page background to avoid a hard edge */
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(236,253,245,0.85) 70%, rgba(255,255,255,0.98) 100%);
}

.hero-inner { width: min(1100px, 92vw); margin: 0 auto; display: grid; justify-items: center; text-align: center; row-gap: 8px; }
.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  margin: 4px 0 8px;
}
.gradient-text { background: linear-gradient(90deg, #22c55e 0%, #16a34a 40%, #15803d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: #475569; font-size: clamp(18px, 2.4vw, 24px); margin: 8px 0 6px; }
.hero-desc { color: var(--muted); font-size: clamp(15px, 2vw, 18px); margin-bottom: 18px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Shared section styles */
.section-title { font-size: clamp(28px, 3.6vw, 40px); margin: 6px 0 8px; }
.section-sub { color: var(--muted); margin: 0 0 22px; font-size: clamp(18px, 2.2vw, 22px); }
.features .section-title, .features .section-sub { text-align: center; }
.learning .section-title, .learning .section-sub { text-align: center; }
.learning .badge { display: block; width: fit-content; margin-left: auto; margin-right: auto; }
.examples .section-title, .examples .section-sub { text-align: center; }
.examples .badge { display: block; width: fit-content; margin-left: auto; margin-right: auto; }
.examples-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 20px; }
.examples-photos img { width: 100%; height: auto; border-radius: 12px; display: block; object-fit: cover; }
.grid { display: grid; gap: var(--gap); }
.features-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.features-tail { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--gap); }
.drives-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.learn-grid  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kits-grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Center Kits heading and badge */
.kits .section-title, .kits .section-sub { text-align: center; }
.kits .badge { display: block; width: fit-content; margin-left: auto; margin-right: auto; }

.card {
  background: radial-gradient(1200px 600px at 50% -200px, #f0fdf4 0%, var(--card) 60%, #ffffff 100%);
  border: 2px solid var(--border);
  outline: 1px solid color-mix(in oklab, var(--accent) 60%, transparent);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 0 0 1px rgba(34,197,94,.12) inset, 0 10px 30px rgba(0,0,0,.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card .icon { color: #16a34a; background: #f0fdf4; border: 1px solid var(--border); width: 44px; height: 44px; border-radius: 10px; display: inline-grid; place-items: center; margin-bottom: 10px; transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background-color 160ms ease; }
.card .icon .i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card .icon.xl { width: 76px; height: 76px; border-radius: 14px; }
.card .icon.xl .i { width: 34px; height: 34px; }

/* Larger icons for Features cards */
.features .card .icon { width: 56px; height: 56px; margin-bottom: 2px; }
.features .card h3 { margin-top: 2px; }
.features .card .icon .i { width: 28px; height: 28px; }

/* Make drive system icons larger */
.drives .card .icon.xl { width: 128px; height: 128px; }

/* Use screenshot as sprite for drive system icons */
.drive-icon { width: 92%; height: 92%; object-fit: contain; filter: saturate(1.05) brightness(1.02) contrast(1.04); border-radius: 12px; display: block; margin: auto; transition: transform 160ms ease, filter 160ms ease; }
.card h3 { margin: 6px 0 6px; font-size: 20px; }
.card p { margin: 0; color: var(--muted); }
/* no longer using span-2; kept for backward compatibility */

.bullet { color: var(--muted); padding-left: 18px; }
.bullet li { margin: 6px 0; }

/* Learning split */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; overflow: hidden; padding: 0; align-items: stretch; }
.split .split-media { margin: 0; height: 100%; display: block; padding: 0; }
.split .split-media img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 0; }
.split .split-body { padding: 14px; height: 100%; display: flex; flex-direction: column; justify-content: center; }
/* Give more width to the text column in Learning */
.learning .split { grid-template-columns: 0.9fr 1.1fr; }
.split .split-body { min-width: 0; }
/* Extra spacing above the Learning split card */
.learning .split { margin-top: 24px; height: auto; min-height: 0; align-items: stretch; overflow: visible; }
/* Make the Learning photo smaller (no crop), aligned left */
.learning .split .split-media { display: block; padding: 0; height: 100%; margin: 0; }
.learning .split .split-media img { width: 100%; height: auto; max-height: clamp(180px, 30vw, 260px); object-fit: contain; object-position: left center; display: block; }
@media (max-width: 720px) {
  .learning .split { height: auto; min-height: 0; }
  .learning .split .split-media img { height: auto; max-height: 200px; }
}

/* Workshops page media pair: force equal columns and equal image sizing */
.workshops .media-pair { grid-template-columns: 1fr 1fr; height: 260px; }
.workshops .media-pair .split-media img { width: auto; height: 260px; max-width: 100%; object-fit: contain; object-position: center center; }
@media (max-width: 720px) {
  .workshops .media-pair { height: 230px; }
  .workshops .media-pair .split-media img { height: 230px; }
}

/* Card-top media for Workshops page */
.workshops .card .card-media { height: 120px; width: 70%; max-width: 200px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; margin: 6px 0 10px auto; }
.workshops .card .card-media img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .workshops .card .card-media:hover img { transform: scale(1.04); }
}
@media (max-width: 720px) {
  .workshops .card .card-media { height: 90px; width: 80%; max-width: 160px; margin: 6px 0 10px auto; }
}

/* Examples */
.workshops .card.item-split { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.workshops .card.item-split .card-media { width: clamp(220px, 34vw, 320px); max-width: 320px; height: 200px; margin: 0; justify-self: end; align-self: start; }
.workshops .card.item-split .card-content { min-width: 0; }
@media (max-width: 720px) {
  .workshops .card.item-split { grid-template-columns: 1fr; }
  .workshops .card.item-split .card-media { width: clamp(180px, 80vw, 260px); height: 150px; margin: 6px 0 0 auto; }
}

/* Examples */
.examples-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; align-items: start; }
.examples-list { display: grid; gap: 12px; }
.list-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 14px; border: 2px solid var(--border); outline: 1px solid color-mix(in oklab, var(--accent) 60%, transparent); box-shadow: 0 0 0 1px rgba(34,197,94,.12) inset; border-radius: 12px; background: #ffffff; }
.list-icon { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; background: #f0fdf4; border: 1px solid var(--border); color: #16a34a; }
.list-icon .i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Emphasis on hover for cards and list items */
@media (hover: hover) and (pointer: fine) {
  .card:hover { border-color: color-mix(in oklab, var(--accent) 40%, transparent); box-shadow: 0 16px 36px rgba(0,0,0,.12); transform: translateY(-2px); }
  .card:hover { outline-color: color-mix(in oklab, var(--accent) 70%, transparent); box-shadow: 0 0 0 1px rgba(34,197,94,.18) inset, 0 16px 36px rgba(0,0,0,.12); }
  .card:hover .icon { transform: scale(1.08); border-color: color-mix(in oklab, var(--accent) 50%, transparent); color: #22c55e; background: #e7f9ef; }
  .card:hover .icon .i { stroke-width: 1.8; }
  .card:hover .drive-icon { transform: scale(1.08); filter: saturate(1.1) brightness(1.15) contrast(1.1); }
  .list-card { transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
  .list-card:hover { border-color: color-mix(in oklab, var(--accent) 35%, transparent); outline-color: color-mix(in oklab, var(--accent) 70%, transparent); box-shadow: 0 0 0 1px rgba(34,197,94,.18) inset, 0 10px 24px rgba(0,0,0,.10); transform: translateY(-2px); }
  .list-card:hover .list-icon { transform: scale(1.08); border-color: color-mix(in oklab, var(--accent) 35%, transparent); color: #22c55e; }
}
.list-title { font-weight: 600; }
.tag { display: inline-block; margin-left: 6px; padding: 2px 8px; font-size: 12px; background: #ecfdf5; color: #065f46; border: 1px solid var(--border); border-radius: 999px; }
.tag.live { background: #065f46; color: #bbf7d0; }
.examples-media video { width: 100%; border-radius: 12px; display: block; }
.media-player iframe,
.media-player video { width: 100%; aspect-ratio: 16/9; display: block; border: 0; border-radius: 12px; background: #000; }
/* Ensure hidden media stays hidden (override display:block) */
.media-player iframe[hidden],
.media-player video[hidden] { display: none !important; }
.examples-list .list-card { cursor: pointer; }
.muted { color: var(--muted); }

.cta { text-align: center; margin-top: 28px; padding: 36px; }
.cta .cta-icon { font-size: 28px; color: var(--good); margin-bottom: 10px; }
.cta h3 { margin: 8px 0 12px; }
.cta p { margin: 0 0 18px; font-size: clamp(16px, 2vw, 20px); }
.cta .hero-cta { gap: 16px; }
/* Make CTA icon much larger */
.cta .icon { width: 96px; height: 96px; border-radius: 16px; margin: 0 auto 12px; color: var(--good); }
.cta .icon .i { width: 48px; height: 48px; stroke-width: 2; }
/* Support PNG icon in CTA */
.cta .icon img.cta-arrow { width: 48px; height: 48px; object-fit: contain; display: block; }

/* Kits section */
.kit-card { padding: 0; overflow: hidden; position: relative; }
.kit-card.highlight { outline: 1px solid color-mix(in oklab, var(--accent) 60%, transparent); box-shadow: 0 0 0 1px rgba(34, 197, 94, .12) inset; }
.kit-media { margin: 0; height: 300px; display: grid; align-items: start; justify-items: center; overflow: hidden; background: #ffffff; border-radius: 12px 12px 0 0; padding: 8px 8px 24px; 
  /* bottom gap variable for image max-height calc */
  --kit-gap: 40px;
}
.kit-media.compact { padding: 16px 16px 36px; --kit-gap: 48px; }
.kit-media.compact img { max-width: 85%; max-height: calc(100% - var(--kit-gap) - 8px); }
.kit-media img { max-width: 100%; max-height: calc(100% - var(--kit-gap)); width: auto; height: auto; object-fit: contain; display: block; border-radius: 0; border: 0; background: transparent; transition: transform 200ms ease; }
.kit-body { padding: 18px; }
.kit-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.kit-sub { margin: 14px 0 8px; font-size: 14px; color: #64748b; }
.tight { margin-top: 8px; }
.kit-start { display: inline-flex; align-items: center; gap: 6px; color: #16a34a; font-weight: 600; font-size: 14px; margin: 2px 0 8px; }
.kit-start .i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.kit-start:hover { color: #22c55e; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 8px; color: var(--muted); }
.checklist .i { width: 18px; height: 18px; stroke: #22c55e; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kit-cta { margin-top: 16px; }
.kit-cta .btn { width: 100%; justify-content: center; }

.chip { display: inline-block; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); background: #f8fafc; color: #0f172a; font-size: 12px; }
.chip.alt { background: #e6f7f0; color: #047857; border-color: #a7f3d0; }
.chip.floating { position: absolute; top: 10px; right: 10px; }
.kits-note { text-align: center; margin-top: 14px; }

@media (hover: hover) and (pointer: fine) {
  .kit-card:hover .kit-media img { transform: scale(1.02); }
}

/* Footer */
.footer-content { padding-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 56px; }
.footer-brand { font-weight: 700; text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.footer-brand .brand-logo { height: 40px; }
.socials { display: flex; gap: 10px; margin-top: 10px; }
.socials a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #f1f5f9; border: 1px solid var(--border); color: var(--muted); text-decoration: none; }
.footer-col h4 { margin: 4px 0 10px; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; }
.footer-col a:hover { color: var(--text); }

/* Footer */
.site-footer {
  padding: 32px 0 64px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.legal p { margin: 0; }
.legal-links a { color: var(--muted); text-decoration: none; margin-left: 12px; }
.legal-links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .brand { font-size: 15px; }
  .site-nav a { padding: 8px; font-size: 14px; }
  .features-grid { grid-template-columns: 1fr; }
  .drives-grid { grid-template-columns: 1fr; }
  .learn-grid  { grid-template-columns: 1fr 1fr; }
  .examples-layout { grid-template-columns: 1fr; }
  .examples-photos { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; overflow: visible; }
  /* Allow Learning split to expand vertically on mobile so CTA isn't clipped */
  .learning .split { height: auto; min-height: 0; }
  .learning .split .split-media,
  .learning .split .split-body { height: auto; }
  .learning .split .split-body { justify-content: flex-start; position: relative; z-index: 1; }
  .learning .split .split-media img { height: auto; width: 100%; max-height: 200px; }
  .footer-grid { grid-template-columns: 1fr; }
  .drives .card .icon.xl { width: 112px; height: 112px; }
  .kits-grid  { grid-template-columns: 1fr; }
  .kit-media { height: 240px; }
  .kit-media.compact { padding: 12px 12px 26px; }
}

/* Extra-tight phones: keep image shorter to ensure CTA stays visible */
@media (max-width: 550px) {
  .learning .split .split-media img { max-height: 180px; }
}
@media (max-width: 430px) {
  .learning .split .split-media img { max-height: 150px; }
}
