/* ==========================================================
   Rozzom Industries - site stylesheet
   1. Design tokens   2. Base   3. Layout   4. Header and footer
   5. Pieces (buttons, badges, cards)   6. Product pages
   7. Tables   8. Small helpers
   ========================================================== */

/* ---------- 1. Design tokens: change a value here, the whole site follows ---------- */
:root {
  --paper: #f4f1ea;        /* page background (your off-white) */
  --surface: #ffffff;      /* cards and tables */
  --ink: #1d2420;          /* main text */
  --ink-soft: #55605a;     /* secondary text */
  --green: #006400;        /* brand dark green */
  --green-deep: #0b3d1f;   /* footer, hover */
  --link: #1f6b43;         /* links: a darker sea green that passes contrast */
  --gold: #b8860b;         /* accent lines only (too light for text) */
  --gold-ink: #7a5a00;     /* gold you can read */
  --line: #d9d4c7;         /* borders */
  --tint: #e9efe6;         /* pale green wash */

  --radius: 12px;
  --shadow: 0 1px 2px rgba(29, 36, 32, .06), 0 6px 20px rgba(29, 36, 32, .06);
  --wrap: 68rem;           /* widest the content gets */
  --gap: clamp(1rem, 2.5vw, 1.75rem);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; color: var(--green-deep); text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- 3. Layout ---------- */
main { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: var(--gap) var(--gap) 3rem; }
main > p, main > ul:not(.product-list, .keyfigs), main > ol { max-width: 46rem; }   /* comfortable line length */
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--green); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 8px; }
.skip-link:focus { top: 0; color: #fff; }

/* ---------- 4. Header and footer (filled in by javascript/layout.js) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
  padding: .9rem var(--gap);
  background: rgba(244, 241, 234, .95);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--green);
}
.site-header .brand { display: flex; align-items: center; gap: .9rem; font-weight: 800; color: var(--green-deep); text-decoration: none; }
.site-header .logo { height: 68px; width: auto; }
.site-header .brand-name { font-size: clamp(1.25rem, 3.2vw, 1.9rem); letter-spacing: -.01em; line-height: 1.1; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.site-header nav a { padding: .65rem 1.1rem; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.site-header nav a:hover { background: var(--tint); }
.site-header nav a[aria-current="page"] { background: var(--green); color: #fff; }
.menu-button { display: none; font: inherit; font-size: 1.05rem; font-weight: 700; padding: .65rem 1.1rem; border: 2px solid var(--green); border-radius: 999px; background: var(--surface); color: var(--green-deep); cursor: pointer; }
@media (max-width: 40rem) {
  .site-header { padding: .6rem var(--gap); }
  .site-header .logo { height: 44px; }
  .site-header .brand { gap: .6rem; flex: 1 1 auto; min-width: 0; }
  .site-header .brand-name { font-size: 1.15rem; }
  .menu-button { display: block; padding: .5rem .9rem; }
  .site-header nav { display: none; flex-basis: 100%; flex-direction: column; padding-bottom: .5rem; }
  .site-header nav.open { display: flex; }
  .site-header nav a { padding: .8rem 1rem; }
}

.site-footer { background: var(--green-deep); color: #e6ece8; padding: 2rem var(--gap); }
.site-footer .inner { max-width: var(--wrap); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0; font-size: .9rem; }

/* ---------- 5. Pieces ---------- */
.btn { display: inline-block; padding: .7rem 1.2rem; border-radius: 999px; border: 2px solid var(--green); background: var(--green); color: #fff; font-weight: 700; text-decoration: none; transition: background .15s, color .15s; }
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0; }

.badge { display: inline-block; padding: .2rem .7rem; border-radius: 999px; background: var(--tint); color: var(--green-deep); border: 1px solid #c5d3c2; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.badge-gold { background: #f6ecd0; border-color: #e0cd96; color: var(--gold-ink); }

.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 40rem; }
.eyebrow { margin: 0 0 .5rem; color: var(--gold-ink); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }

.hero { padding: clamp(1.5rem, 6vw, 4rem) 0 clamp(1rem, 3vw, 2rem); border-bottom: 3px solid var(--gold); margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); }

/* Card grids: as many columns as fit, never narrower than 15rem */
.cards, .product-list { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); }
.card, .product > a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card { padding: 1.25rem; }
a.card:hover, .product > a:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 2px 4px rgba(29,36,32,.08), 0 12px 28px rgba(29,36,32,.12); color: var(--ink); }
.card h2, .card h3, .product h2, .product h3 { font-size: 1.15rem; margin: 0 0 .35em; }
.card p, .product p { margin: 0 0 .5em; color: var(--ink-soft); font-size: .97rem; }
.card p:last-child, .product p:last-child { margin-bottom: 0; }
.product img, .product .no-photo { order: -1; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint); }
.product .no-photo { display: grid; place-items: center; color: var(--ink-soft); font-size: .9rem; }
.product h2, .product h3 { padding: 1rem 1.25rem 0; }
.product p { padding: 0 1.25rem; }
.product > a > :last-child { padding-bottom: 1.25rem; }

/* ---------- 6. Product pages ---------- */
.breadcrumb { font-size: .9rem; color: var(--ink-soft); margin: 0 0 1.25rem; }
.breadcrumb a { color: var(--ink-soft); }
.product-hero { display: grid; gap: var(--gap); align-items: start; margin: 0 0 2rem; }
.product-hero > img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--tint); }
@media (min-width: 52rem) {
  .product-hero:has(> img) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .product-hero > img { position: sticky; top: 5.5rem; }
}
.product-hero h1, .product-hero h2 { margin-top: .3em; }
.tagline { font-size: 1.2rem; color: var(--ink-soft); }
.feature-list { list-style: none; padding: 0; margin: 1rem 0; }
.feature-list > li { padding: .7rem 0; border-top: 1px solid var(--line); }
.feature-list > li:last-child { border-bottom: 1px solid var(--line); }
.feature-list ul { margin: .4rem 0 .2rem; padding-left: 1.2rem; color: var(--ink-soft); font-size: .97rem; }
.feature-list ul li { margin: .25rem 0; }
.note, .placeholder { margin-top: 2.5rem; padding: .9rem 1.1rem; border-left: 4px solid var(--gold); background: #fbf6e6; border-radius: 0 8px 8px 0; color: #4d4532; font-size: .95rem; max-width: none; }

.keyfigs { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); max-width: none; }
.keyfigs li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.keyfigs strong { display: block; font-size: 1.6rem; line-height: 1.2; color: var(--green-deep); font-variant-numeric: tabular-nums; }
.keyfigs span { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }

/* ---------- 7. Tables ---------- */
.table-wrap, .tier-scroll, .spec-table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.spec-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.spec-table caption { text-align: left; font-weight: 700; padding: .8rem 1rem; color: var(--green-deep); }
.spec-table th, .spec-table td { padding: .65rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.spec-table tr:last-child > * { border-bottom: 0; }
.spec-table th { color: var(--green-deep); font-weight: 700; }
.spec-table tbody th, .spec-table tr > th:first-child { width: 32%; min-width: 9rem; }
.spec-table thead th, .tier-table tr:first-child th { background: var(--tint); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.spec-table .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tier-table { min-width: 36rem; }
.tier-table td:first-child { font-weight: 700; color: var(--green-deep); }
.tier-table tr:nth-child(even) td { background: #fbfaf6; }

/* ---------- Slideshows (javascript/homepagejava.js builds them) ---------- */
.slider { position: relative; width: 100%; margin: 1.25rem 0; aspect-ratio: 12 / 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.slider img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(11, 61, 31, .75); color: #fff; font-size: 1.9rem; line-height: 1; cursor: pointer; }
.slider-btn:hover { background: var(--green-deep); }
.slider-btn.prev { left: .75rem; }
.slider-btn.next { right: .75rem; }
.slider-dots { position: absolute; bottom: .6rem; width: 100%; display: flex; justify-content: center; gap: .5rem; }
.slider-dots button { width: .75rem; height: .75rem; padding: 0; border-radius: 50%; border: 2px solid #fff; background: rgba(11, 61, 31, .45); cursor: pointer; }
.slider-dots button.on { background: #fff; }
@media (max-width: 40rem) { .slider-btn { width: 2rem; height: 2rem; font-size: 1.4rem; } .slider-dots { bottom: .3rem; } }

/* ---------- 8. Small helpers ---------- */
.center { text-align: center; }
.comment-form { width: 100%; min-height: 70rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* trademark mark next to the brand name */
.tm { font-size: .45em; font-weight: 600; vertical-align: super; line-height: 0; margin-left: .1em; }

/* ---------- Home page layout: jump links, section headers, compact product grids ---------- */
.jump { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.jump a { display: inline-block; padding: .45rem 1.1rem; border: 2px solid var(--green); border-radius: 999px; background: var(--surface); color: var(--green-deep); font-weight: 700; text-decoration: none; }
.jump a:hover { background: var(--tint); color: var(--green-deep); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin: 2.4rem 0 .4rem; scroll-margin-top: 6rem; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; }
.section-intro { margin: 0 0 .25rem; color: var(--ink-soft); max-width: 46rem; }
.product-list.compact { grid-template-columns: repeat(auto-fill, minmax(min(12.5rem, 100%), 1fr)); gap: 1rem; margin-top: .9rem; }
.product-list.compact .product h3 { font-size: 1.05rem; }
.product-list.compact .product p { font-size: .92rem; }
.cards.two, .cards.three { grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); }

@media (max-width: 40rem) {
  .product-list.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .product-list.compact .product h3 { padding: .75rem .8rem 0; font-size: .98rem; }
  .product-list.compact .product p { padding: 0 .8rem; font-size: .86rem; }
  .product-list.compact .product > a > :last-child { padding-bottom: .9rem; }
}

/* ---------- Learning database ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: 1.25rem 0 .5rem; }
.filters label { display: grid; gap: .25rem; font-weight: 700; font-size: .9rem; color: var(--green-deep); }
.filters input, .filters select { font: inherit; padding: .55rem .8rem; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); min-width: 12rem; }
.filters input:focus, .filters select:focus { border-color: var(--green); outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; padding: 0; list-style: none; }
.chip { font: inherit; font-size: .85rem; font-weight: 700; padding: .3rem .8rem; border-radius: 999px; border: 1px solid #c5d3c2; background: var(--tint); color: var(--green-deep); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.tags li { font-size: .78rem; padding: .1rem .55rem; border-radius: 999px; background: var(--tint); color: var(--green-deep); }
.meta { color: var(--ink-soft); font-size: .88rem; font-weight: 400; }
.count { color: var(--ink-soft); font-size: .95rem; }
details.week { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: .6rem 0; padding: .2rem 1rem; }
details.week summary { cursor: pointer; padding: .7rem 0; }
details.week ol { margin: 0 0 .8rem; padding-left: 1.4rem; }
details.week li { margin: .3rem 0; }

/* ---------- Home page film ---------- */
.film { margin: 2rem 0 .5rem; }
.film video { display: block; width: 100%; max-width: 56rem; height: auto; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); box-shadow: var(--shadow); }
.film .meta { margin: .5rem 0 0; }
.film-notes { max-width: 56rem; margin-top: .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: .2rem 1rem; }
.film-notes summary { cursor: pointer; padding: .6rem 0; font-weight: 700; }
.film-notes ol { margin: 0 0 .75rem; padding-left: 1.3rem; }


/* ---------- Phone polish (2026-11-18 visual review) ---------- */
/* Keep the logo, name and Menu button on one row on narrow phones, so the sticky header stays short */
@media (max-width: 40rem) {
  .site-header { flex-wrap: wrap; column-gap: .75rem; }
  .site-header .brand { flex: 1 1 0; }
  .site-header .brand-name { white-space: nowrap; }
  .menu-button { flex: none; }
}
@media (max-width: 24rem) {
  .site-header .logo { height: 38px; }
  .site-header .brand { gap: .45rem; }
  .site-header .brand-name { font-size: 1.02rem; }
  .menu-button { padding: .4rem .75rem; font-size: .98rem; }
}
/* Slide arrows sit closer to the edges and are lighter on phones, so they cover less of the words on the slides */
@media (max-width: 40rem) {
  .slider-btn { width: 1.8rem; height: 1.8rem; font-size: 1.25rem; background: rgba(11, 61, 31, .55); }
  .slider-btn.prev { left: .3rem; }
  .slider-btn.next { right: .3rem; }
}

/* Film embed (Google Vids, loaded on click) */
.film-frame { position: relative; width: 100%; max-width: 56rem; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.film-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.film-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-play-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 4.5rem; height: 4.5rem; border-radius: 50%; background: rgba(11, 61, 31, .85); color: #fff; font-size: 1.8rem; line-height: 4.5rem; text-align: center; padding-left: .25rem; }
.film-play:hover .film-play-btn, .film-play:focus-visible .film-play-btn { background: var(--green-deep); }

/* Product picture on pages without a product-hero layout */
.product-figure { display: block; width: 100%; max-width: 24rem; height: auto; border-radius: var(--radius); background: var(--tint); }
