/* site.css — Imprimindo3D. Cores do logo: #006B68, #00989B, #023A37; laranja da capa só no livro. */
/* Layout: sticky header, full-width bands (deep teal for the book), content in a 1120px column.
   Signature: horizontal "layer lines" (FDM printing) on the dark bands and mono spec labels. */
:root {
  --bg: #F2F7F6;        /* paper, biased toward the logo teal */
  --surface: #FFFFFF;
  --fg: #12302E;
  --muted: #4B6563;
  --line: #D3E3E1;
  --brand: #006B68;     /* logo teal: buttons, links */
  --on-brand: #FFFFFF;
  --brand-2: #00989B;   /* logo aqua: details, "3D" */
  --deep: #023A37;      /* logo deep green: book band, footer */
  --on-deep: #E8F4F2;
  --on-deep-muted: #A9CBC7;
  --amber: #F2A33A;     /* from the book cover: only for the book */
  --on-amber: #2B1700;
  --logo-name: #006B68;
  --logo-3d: #00989B;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #081514; --surface: #0F2120; --fg: #E4F1EF; --muted: #9BB8B5; --line: #1F3836;
    --brand: #3CC0BA; --on-brand: #04201E; --brand-2: #5FD6D1;
    --deep: #03211F; --on-deep: #E4F1EF; --on-deep-muted: #9BC2BE;
    --amber: #F5B254; --on-amber: #2B1700;
    --logo-name: #E4F1EF; --logo-3d: #5FD6D1;
   
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font: 17px/1.6 var(--font-body); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
a { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band { padding-block: clamp(48px, 7vw, 88px); }
.stack { display: grid; gap: 20px; }
.label { font: 500 0.78rem/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }


/* Header */
header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { display: block; }
.brand .mark { width: 34px; height: 46px; }
.brand .name { height: 18px; width: auto; }
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
nav.main a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; text-decoration: none; color: var(--fg); font-weight: 600; }
nav.main a:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
nav.main a[aria-current="page"] { background: var(--brand); color: var(--on-brand); }
nav.main a.book-link::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); margin-left: 8px; }
.menu-btn { display: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 600 1rem var(--font-body); }
@media (max-width: 1100px) {
  header.site .wrap { flex-wrap: wrap; }
  nav.main ul { flex-wrap: wrap; }
  .js .menu-btn { display: inline-flex; align-items: center; }
  .js nav.main { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); }
  .js header.site[data-open] nav.main { display: block; }
  .js nav.main ul { flex-direction: column; flex-wrap: nowrap; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .js nav.main a { width: 100%; border-radius: 10px; }
}

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.btn.amber { background: var(--amber); color: var(--on-amber); }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.ghost { border-color: currentColor; color: inherit; }
.btn small { font-weight: 500; opacity: 0.8; }

/* Dark "print bed" band with layer lines */
.deep { background: var(--deep); color: var(--on-deep);
  background-image: repeating-linear-gradient(0deg, transparent 0 7px, color-mix(in srgb, var(--brand-2) 9%, transparent) 7px 8px); }
.deep .lead { color: var(--on-deep-muted); }
.deep .label { color: var(--amber); }

/* Hero */
.hero .wrap { display: grid; gap: 40px; align-items: center; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.hero .copy { display: grid; gap: 22px; min-width: 0; }
.cover-wrap { position: relative; justify-self: center; width: min(340px, 80%); }
.cover-wrap img { border-radius: 10px; box-shadow: 0 24px 48px -18px rgba(0,0,0,0.55); transform: rotate(-2.5deg); }
.cover-wrap .layer-tag { position: absolute; right: -8px; top: -12px; background: var(--amber); color: var(--on-amber); font: 500 0.75rem var(--font-mono); padding: 6px 10px; border-radius: 6px; transform: rotate(-2.5deg); }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; } .cover-wrap { width: min(260px, 72%); } }

/* Print-in animation: the cover builds from the bed up, like a print */
@media (prefers-reduced-motion: no-preference) {
  .cover-wrap img { animation: print-in 1.4s steps(14, end) both; }
  @keyframes print-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
}

/* Tiles (start here) */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr; } }
.tile { display: grid; gap: 8px; align-content: start; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--fg); }
.tile:hover { border-color: var(--brand); }
.tile .label { color: var(--muted); }
.tile p { color: var(--muted); font-size: 0.98rem; }
.tile.featured { background: var(--deep); color: var(--on-deep); border-color: var(--deep); }
.tile.featured p, .tile.featured .label { color: var(--on-deep-muted); }

/* Chapters strip (home) */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.strip figure { margin: 0; scroll-snap-align: start; display: grid; gap: 8px; min-width: 0; }
.strip img { border-radius: 10px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.strip figcaption { font-weight: 600; font-size: 0.98rem; }
.strip figcaption span { display: block; font: 500 0.72rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-deep-muted); }

.split { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Ages */
.ages { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .ages { grid-template-columns: 1fr; } }
.age { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; }
.age b { font: 800 1.9rem/1 var(--font-display); color: var(--brand); }

/* Chapters (book page) */
.chapters { display: grid; gap: 56px; }
.chapter { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.chapter:nth-child(even) .chapter-img { order: 2; }
@media (max-width: 760px) { .chapter { grid-template-columns: 1fr; } .chapter:nth-child(even) .chapter-img { order: 0; } }
.chapter-img img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.chapter .copy { display: grid; gap: 12px; min-width: 0; }
.chapter ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.try { border-left: 4px solid var(--amber); background: var(--surface); padding: 12px 16px; border-radius: 0 10px 10px 0; }
.try b { font-family: var(--font-mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; display: block; color: var(--muted); }

/* Buy panel */
.buy { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .buy { grid-template-columns: 1fr; } }
.buy a { display: grid; gap: 4px; padding: 20px; border-radius: var(--radius); text-decoration: none; background: color-mix(in srgb, var(--on-deep) 8%, transparent); color: var(--on-deep); border: 1px solid color-mix(in srgb, var(--on-deep) 20%, transparent); }
.buy a:first-child { background: var(--amber); color: var(--on-amber); border-color: var(--amber); }
.buy a b { font: 700 1.15rem var(--font-display); }
.buy a span { font-size: 0.95rem; opacity: 0.85; }

/* Gallery */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.gallery figcaption { padding: 12px 14px; font-weight: 600; }

.story { display: grid; gap: 28px; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; } }
.big-number { font: 800 clamp(3.5rem, 9vw, 6rem)/0.9 var(--font-display); color: var(--amber); }

/* Glossary */
.search { width: 100%; max-width: 420px; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 400 1rem var(--font-body); }
dl.terms { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
@media (max-width: 760px) { dl.terms { grid-template-columns: 1fr; } }
dl.terms div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 6px; }
dl.terms dt { font: 700 1.1rem var(--font-display); }
dl.terms dd { margin: 0; color: var(--muted); }
.empty { color: var(--muted); }

/* Forms */
form.contact { display: grid; gap: 14px; max-width: 560px; }
form.contact label { display: grid; gap: 6px; font-weight: 600; }
form.contact input, form.contact textarea { min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 400 1rem var(--font-body); }
form.contact textarea { min-height: 140px; resize: vertical; }
.status { color: var(--muted); }
.mail { font: 700 1.3rem var(--font-display); user-select: all; word-break: break-all; }

/* Store */
.products { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.product .ph { aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--on-deep-muted); font: 500 0.8rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--deep); background-image: repeating-linear-gradient(0deg, transparent 0 7px, color-mix(in srgb, var(--brand-2) 14%, transparent) 7px 8px); }
.product .body { padding: 20px; display: grid; gap: 10px; align-content: start; }
.product ul { margin: 0; padding-left: 1.2em; color: var(--muted); }

footer.site { background: var(--deep); color: var(--on-deep); }
footer.site .wrap { padding-block: 40px; display: grid; gap: 24px; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { footer.site .wrap { grid-template-columns: 1fr; } }
footer.site a { color: var(--on-deep); }
footer.site p, footer.site li { color: var(--on-deep-muted); }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
footer.site .footer-name { height: 20px; width: auto; }
footer.site .label { color: var(--amber); }

.section-head { display: grid; gap: 10px; margin-bottom: 28px; }

.stack-sm { display: grid; gap: 10px; align-content: start; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 40; background: var(--surface); color: var(--fg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }
.subtitle { font: 700 1.35rem var(--font-display); color: var(--amber); }
.byline { color: var(--on-deep-muted); }
.pad-top-0 { padding-top: 0; }
.panel { border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); }
.product .ph svg { width: 64px; height: auto; }
.btn { cursor: pointer; font: 700 1rem var(--font-body); }
.notice { border-radius: 10px; padding: 12px 16px; font-weight: 600; }
.notice.ok { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--fg); border: 1px solid var(--brand); }
.notice.err { background: color-mix(in srgb, #C0392B 12%, var(--surface)); color: var(--fg); border: 1px solid #C0392B; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.buy-one { display: grid; gap: 8px; max-width: 520px; padding: 24px; border-radius: var(--radius); text-decoration: none; background: var(--amber); color: var(--on-amber); }
.buy-one b { font: 800 1.5rem var(--font-display); }
.not-found { text-align: left; }
.h3 { font-size: 1.25rem; }
.product p { color: var(--muted); }
.mail a { color: inherit; text-decoration: none; }
.mail a:hover { text-decoration: underline; }

/* Idiomas e cabeçalho */
.header-tools { display: flex; align-items: center; gap: 8px; order: 3; }
nav.main { order: 2; }
.langs { display: flex; gap: 2px; }
.langs a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 44px; padding: 0 6px; border-radius: 8px; text-decoration: none; color: var(--muted); font: 500 0.85rem var(--font-mono); letter-spacing: 0.04em; }
.langs a:hover { color: var(--fg); }
.langs a[aria-current="true"] { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1100px) { .header-tools { margin-left: auto; } nav.main { order: 4; } }
@media (max-width: 440px) { .brand .name { display: none; } }

/* Livro */
.btn.soon, .buy-one.soon { background: color-mix(in srgb, var(--on-deep) 12%, transparent); color: var(--on-deep); border: 1px dashed color-mix(in srgb, var(--on-deep) 45%, transparent); cursor: default; }
.rounded { border-radius: var(--radius); width: 100%; height: auto; }
ul.inside { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
ul.inside li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-weight: 600; }
.new { display: inline-block; margin-left: 8px; background: var(--amber); color: var(--on-amber); border-radius: 6px; padding: 2px 8px; letter-spacing: 0.04em; }
.chapter-text { color: var(--muted); font-size: 1.08rem; }
.other-langs { color: var(--on-deep-muted); }
.other-langs a { color: var(--on-deep); }
.product-cover { display: block; background: var(--deep); padding: 20px; }
.product-cover img { width: min(220px, 70%); margin: 0 auto; border-radius: 8px; }

/* Nossa história: linha do tempo (cada momento é uma "camada") */
ol.timeline { list-style: none; margin: 0; padding: 0 0 0 36px; position: relative; display: grid; gap: 56px; }
ol.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px;
  background: repeating-linear-gradient(180deg, var(--brand) 0 10px, var(--brand-2) 10px 12px); }
.moment { position: relative; display: grid; gap: 16px; min-width: 0; }
.moment .dot { position: absolute; left: -33px; top: 4px; width: 19px; height: 19px; border-radius: 50%; background: var(--amber); border: 4px solid var(--bg); box-shadow: 0 0 0 2px var(--brand); }
.moment-head { display: grid; gap: 6px; }
.when { font: 800 clamp(1.5rem, 3.5vw, 2.1rem)/1 var(--font-display); color: var(--brand); }
.chip { display: inline-flex; gap: 8px; align-items: center; justify-self: start; font-weight: 600; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.chip span { font: 500 0.72rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.moment-body { display: grid; gap: 20px; }
.moment-body.with-cover { grid-template-columns: minmax(0, 1fr) 180px; align-items: start; }
@media (max-width: 560px) { .moment-body.with-cover { grid-template-columns: 1fr; } }
.moment-text { display: grid; gap: 12px; max-width: 70ch; color: var(--fg); font-size: 1.05rem; }
.moment-cover img { border-radius: 8px; width: 180px; transform: rotate(-2deg); box-shadow: 0 16px 32px -16px rgba(0,0,0,0.45); }
.photos { display: grid; gap: 12px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
@media (max-width: 760px) { .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.photos figure { margin: 0; display: grid; gap: 6px; align-content: start; min-width: 0; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.photos figure.lead-photo { grid-column: 1 / -1; }
.photos figure.lead-photo img { aspect-ratio: 16 / 9; }
.photos figcaption { font-size: 0.92rem; color: var(--muted); }
/* Menu com 7 itens: um pouco mais justo no computador */
nav.main a { white-space: nowrap; }
@media (min-width: 1101px) and (max-width: 1280px) { nav.main a { padding: 0 10px; } }
