/* =============================================================
   Cloud Couch Guide — editorial style sheet
   1 Tokens · 2 Reset · 3 Utilities · 4 Typography · 5 Header/Nav
   6 Footer · 7 Hero · 8 Bands · 9 Product card · 10 Ficha
   11 Radar · 12 Spec table · 13 Article/Guide/FAQ · 14 Compare
   15 Breadcrumb/misc · 16 Responsive · 17 Reduced motion
   ============================================================= */

/* 1 — Tokens ---------------------------------------------------- */
:root {
  --bg: #FDFCFA;
  --surface: #F7F4EF;
  --ink: #2B2724;
  --muted: #A89F92;
  --line: #E7E1D7;
  --accent: #8CA3B8;         /* dusty sky blue — links & CTAs, sparingly */
  --accent-ink: #3f5163;     /* darker sky for text-on-white contrast */
  --accent-2: #C99B7C;       /* soft terracotta — badges only */
  --accent-2-ink: #8a5a3c;

  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1140px;
  --wrap-narrow: 760px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --sp: clamp(3.5rem, 8vw, 6rem);       /* vertical rhythm between bands */

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(43, 39, 36, .04), 0 8px 24px rgba(43, 39, 36, .05);
  --shadow-sm: 0 1px 2px rgba(43, 39, 36, .05);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* 2 — Reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

/* 3 — Utilities --------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: var(--wrap-narrow); }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 999;
  background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.pageflow { padding-block: clamp(1.5rem, 4vw, 2.75rem) var(--sp); }
.pagehead { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.pagehead-intro { color: var(--ink); font-size: 1.15rem; }
.sec-sub { color: var(--muted); font-size: .95rem; margin-top: -.4rem; margin-bottom: 1.4rem; }
.empty { color: var(--muted); padding: 2rem 0; }

/* 4 — Typography ------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -.005em; font-optical-sizing: auto; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.35rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.22rem; font-weight: 500; }
.lede { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--ink); max-width: 40ch; }
.standfirst { font-size: 1.2rem; color: var(--ink); margin-top: 1rem; max-width: 52ch; }

/* buttons / links */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .98rem;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--accent-ink); text-decoration: none; }
.btn-outline {
  display: inline-block; border: 1px solid var(--line); color: var(--ink);
  padding: .75rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  background: var(--bg); transition: border-color .25s var(--ease);
}
.btn-outline:hover { border-color: var(--muted); text-decoration: none; }
.btn-text { color: var(--accent-ink); font-weight: 600; font-size: .95rem; }
.btn-text:hover { text-decoration: underline; }
.btn-buy { background: var(--accent); }
.btn-buy.is-disabled { background: var(--surface); color: var(--muted); border: 1px dashed var(--line); cursor: not-allowed; }

/* badges — the only place accent-2 appears */
.badge {
  position: absolute; top: .8rem; left: .8rem; z-index: 2;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  padding: .32rem .6rem; border-radius: 999px; background: var(--bg);
}
.badge-choice { color: var(--accent-2-ink); box-shadow: inset 0 0 0 1px var(--accent-2); }
.badge-value { color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.sample-tag {
  position: absolute; top: .8rem; right: .8rem; z-index: 2;
  font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--bg); padding: .28rem .55rem; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}

/* 5 — Header / Nav ---------------------------------------- */
.demobar {
  background: var(--surface); color: var(--muted);
  font-size: .8rem; text-align: center; padding: .5rem var(--gutter); letter-spacing: .01em;
}
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.head-inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.wordmark { font-family: var(--serif); font-size: 1.24rem; font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.wordmark:hover { text-decoration: none; color: var(--accent-ink); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.5rem); }
.nav-link, .nav-lang { color: var(--ink); font-size: .95rem; font-weight: 500; }
.nav-link:hover, .nav-lang:hover { color: var(--accent-ink); text-decoration: none; }
.nav-lang { color: var(--muted); border-left: 1px solid var(--line); padding-left: clamp(.6rem, 2vw, 1.2rem); }

.navgroup { position: relative; }
.navgroup > summary {
  list-style: none; cursor: pointer; font-size: .95rem; font-weight: 500; color: var(--ink);
  display: inline-flex; align-items: center; gap: .35rem;
}
.navgroup > summary::-webkit-details-marker { display: none; }
.navgroup > summary:hover { color: var(--accent-ink); }
.chev { width: .5rem; height: .5rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-1px); opacity: .55; transition: transform .2s var(--ease); }
.navgroup[open] .chev { transform: rotate(225deg); }
.navmenu {
  position: absolute; right: 0; top: calc(100% + .7rem); min-width: 230px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: .5rem; display: flex; flex-direction: column;
}
.navmenu a { padding: .55rem .7rem; border-radius: 7px; font-size: .92rem; color: var(--ink); }
.navmenu a:hover { background: var(--surface); text-decoration: none; }
.navtoggle { display: none; }

/* 6 — Footer --------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); background: var(--bg); padding-block: clamp(2.5rem, 6vw, 4rem); }
.foot-tag { font-family: var(--serif); font-size: 1.15rem; max-width: 34ch; color: var(--ink); }
.foot-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; margin-block: 2.25rem; }
.foot-col h3 { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.foot-col a { color: var(--ink); font-size: .92rem; }
.foot-col a:hover { color: var(--accent-ink); }
.foot-disclosure { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1.4rem; max-width: 70ch; }
.foot-legal { font-size: .78rem; color: var(--muted); margin-top: .8rem; }

/* 7 — Hero ---------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.hero-copy h1 { max-width: 15ch; margin-bottom: .7rem; }
.hero-cta { margin-top: 1.8rem; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.hero-fig { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-fig img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-fig figcaption, .art-fig figcaption { font-size: .78rem; color: var(--muted); padding: .6rem .9rem; background: var(--surface); }

/* 8 — Bands ------------------------------------------- */
.band { padding-block: var(--sp); }
.band + .band { padding-top: 0; }
.band-alt { background: var(--surface); }
.band-alt + .band, .band + .band-alt { padding-top: var(--sp); }
.band-head { max-width: 44rem; margin-bottom: clamp(1.8rem, 4vw, 2.75rem); }
.band-head p { color: var(--muted); margin-top: .5rem; }
.band-more { margin-top: 2rem; }

.pgrid { display: grid; gap: clamp(1.3rem, 2.6vw, 1.9rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 322px)); justify-content: start; }
.howgrid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.how-item h3 { margin-bottom: .3rem; }
.how-item p { color: var(--muted); font-size: .95rem; }
.how-item { border-top: 2px solid var(--ink); padding-top: .9rem; }

.catgrid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.catcard {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 1.35rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); font-family: var(--serif); font-size: 1.1rem; background: var(--bg);
  transition: border-color .25s var(--ease);
}
.catcard:hover { border-color: var(--muted); text-decoration: none; }
.catcard-go { color: var(--accent-ink); }

.guidegrid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
.guidecard { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); background: var(--bg); transition: border-color .25s var(--ease); }
.guidecard:hover { border-color: var(--muted); text-decoration: none; }
.guidecard h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.guidecard p { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }

/* 9 — Product card --------------------------------- */
.pcard { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); transition: border-color .25s var(--ease); max-width: 420px; }
.pcard:hover { border-color: var(--muted); }
.pcard-media { position: relative; display: block; }
.ph {
  aspect-ratio: 4 / 3; background: var(--surface);
  display: grid; place-items: center; padding: 2rem; text-align: center;
  border-bottom: 1px dashed var(--line);
}
.ph span { font-size: .8rem; color: var(--muted); max-width: 22ch; }
.ph-lg { aspect-ratio: 4 / 3; border: 1px dashed var(--line); border-radius: var(--radius); }
.pcard-body { padding: 1.25rem 1.35rem 1.4rem; }
.pcard-brand { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pcard-name { margin: .3rem 0 .5rem; font-size: 1.3rem; }
.pcard-name a { color: var(--ink); }
.pcard-name a:hover { color: var(--accent-ink); text-decoration: none; }
.pcard-desc { font-size: .93rem; color: var(--muted); margin-bottom: 1rem; }
.scorechips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.1rem; }
.scorechips li { display: flex; gap: .35rem; align-items: baseline; font-size: .78rem; background: var(--surface); border-radius: 999px; padding: .3rem .6rem; color: var(--muted); }
.scorechips b { color: var(--ink); font-size: .85rem; }
.pcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.price { font-size: .95rem; color: var(--muted); }
.price strong { color: var(--ink); font-size: 1.05rem; }
.price s { color: var(--muted); }
.price .est { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.price-date { display: block; font-size: .76rem; color: var(--muted); margin-top: .3rem; }

/* 10 — Ficha -------------------------------------- */
.ficha .crumbs { margin-bottom: 1.5rem; }
.ficha-top { display: grid; gap: clamp(1.5rem, 4vw, 3rem); margin-bottom: var(--sp); }
.ficha-media { position: relative; }
.ficha-intro h1 { margin: .2rem 0 .6rem; }
.rating { color: var(--accent-2); font-size: 1rem; letter-spacing: .05em; }
.rating span { color: var(--muted); font-size: .85rem; margin-left: .5rem; letter-spacing: 0; }
.ficha-desc { font-size: 1.1rem; margin-bottom: 1rem; }
.ficha-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.2rem; }
.editor-note { margin-top: 1.1rem; font-size: .92rem; color: var(--muted); border-left: 2px solid var(--accent-2); padding-left: .9rem; }
.editor-note strong { color: var(--accent-2-ink); }
.ficha-sec { margin-bottom: var(--sp); max-width: var(--wrap-narrow); }
.ficha-sec h2 { margin-bottom: .4rem; }
.radar-wrap { display: grid; gap: 1.5rem; align-items: center; }
.buy-again { text-align: center; padding: 2rem; background: var(--surface); border-radius: var(--radius); }
.buy-again .pricehint { font-size: .8rem; color: var(--muted); margin-top: .8rem; }
.pricehint { font-size: .8rem; color: var(--muted); }

/* 11 — Radar ------------------------------------ */
.radar { width: 100%; max-width: 340px; height: auto; margin-inline: auto; overflow: visible; }
.rad-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.rad-spoke { stroke: var(--line); stroke-width: 1; }
.rad-label { font-family: var(--sans); font-size: 11px; fill: var(--muted); font-weight: 500; }
.rad-area { stroke-width: 1.5; fill-opacity: .16; }
.rad-area.s0 { fill: var(--accent); stroke: var(--accent-ink); }
.rad-area.s1 { fill: var(--accent-2); stroke: var(--accent-2-ink); }
.rad-area.s2 { fill: #9db89d; stroke: #4f6b4f; }
.rad-area.s3 { fill: #b9a0c4; stroke: #6a4f77; }
.rad-dot.s0 { fill: var(--accent-ink); }
.rad-dot.s1 { fill: var(--accent-2-ink); }
.rad-dot.s2 { fill: #4f6b4f; }
.rad-dot.s3 { fill: #6a4f77; }
.radar-legend { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; justify-content: center; margin-top: 1rem; font-size: .85rem; }
.radar-legend span { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); }
.radar-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg0 { background: var(--accent); } .lg1 { background: var(--accent-2); } .lg2 { background: #9db89d; } .lg3 { background: #b9a0c4; }

/* 12 — Spec table ---------------------------- */
.spectable { width: 100%; border-collapse: collapse; font-size: .93rem; }
.spectable th, .spectable td { text-align: left; padding: .7rem .2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spectable th[scope="row"] { color: var(--muted); font-weight: 500; width: 42%; }
.spectable .spec-group th { font-family: var(--serif); font-size: 1rem; color: var(--ink); padding-top: 1.6rem; border-bottom: 2px solid var(--ink); }
.spectable .cm { color: var(--muted); font-size: .82em; }

/* 13 — Article / Guide / FAQ ------------------ */
.article { padding-bottom: 2rem; }
.art-head h1 { max-width: 20ch; }
.art-fig { margin-block: 2rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.art-fig img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.prose { max-width: 68ch; }
.prose h2 { margin: 2.4rem 0 .8rem; }
.prose p { margin-bottom: 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.3rem 1.15rem; }
.prose li { margin-bottom: .5rem; }
.prose strong { color: var(--ink); }
.faq { max-width: 68ch; margin-top: 3rem; }
.faq h2 { margin-bottom: 1rem; }
.faq-item { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq-item summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent-ink); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item p { margin-top: .7rem; color: var(--muted); }
.art-foot { margin-top: 2.5rem; }
.ideal { background: var(--surface); border-radius: var(--radius-sm); padding: 1rem 1.2rem; font-size: .98rem; }
.proscons { display: grid; gap: 1.4rem; margin: 1.8rem 0; }
.pc h3 { margin-bottom: .6rem; }
.pc ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.pc li { position: relative; padding-left: 1.5rem; font-size: .95rem; }
.pc li::before { position: absolute; left: 0; top: 0; }
.pc-pro li::before { content: "\2713"; color: #5f7d5f; }
.pc-con li::before { content: "\2013"; color: var(--accent-2-ink); }
.reviewsum { border-left: 2px solid var(--line); padding-left: 1.1rem; color: var(--ink); font-size: 1.02rem; }

/* 14 — Compare ------------------------------ */
.compare-pick { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 2rem; }
.compare-pick legend { font-family: var(--serif); font-size: 1.1rem; padding-inline: .4rem; }
.pickrow { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .8rem; }
.pickchip { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 999px; padding: .45rem .9rem; font-size: .9rem; cursor: pointer; }
.pickchip input { accent-color: var(--accent-ink); }
.tablescroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmptable { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .9rem; }
.cmptable th, .cmptable td { border-bottom: 1px solid var(--line); padding: .7rem .9rem; text-align: left; vertical-align: top; }
.cmptable thead th { font-family: var(--serif); font-weight: 500; font-size: 1rem; border-bottom: 2px solid var(--ink); }
.cmptable th[scope="row"] { color: var(--muted); font-weight: 500; }
.cmptable td.best { background: rgba(140, 163, 184, .12); font-weight: 600; }
.cmptable .buyrow td { padding-top: 1rem; }
.compare-radars { display: grid; gap: 1.5rem; margin: 2rem 0; }

/* 15 — Breadcrumb / misc ------------------- */
.crumbs { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.5rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs [aria-current] { color: var(--ink); }
.crumb-sep { opacity: .5; }

/* 16 — Responsive ------------------------- */
@media (min-width: 640px) {
  .catgrid { grid-template-columns: repeat(2, 1fr); }
  .foot-cols { grid-template-columns: repeat(4, 1fr); }
  .proscons { grid-template-columns: 1fr 1fr; }
  .radar-wrap { grid-template-columns: 320px 1fr; }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1.05fr; }
  .howgrid { grid-template-columns: repeat(5, 1fr); }
  .guidegrid { grid-template-columns: 1fr 1fr; }
  .catgrid { grid-template-columns: repeat(3, 1fr); }
  .ficha-top { grid-template-columns: 1fr 1fr; align-items: start; }
  .compare-radars { grid-template-columns: repeat(2, 1fr); }
}

/* mobile nav — only when JS is present (progressive enhancement) */
@media (max-width: 899px) {
  html.js .navtoggle {
    display: flex; flex-direction: column; gap: 4px; margin-left: auto;
    width: 34px; height: 34px; align-items: center; justify-content: center;
  }
  html.js .navtoggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
  html.js .navtoggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  html.js .navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  html.js .navtoggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  html.js .site-nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 82vw);
    background: var(--bg); border-left: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 5rem 1.5rem 2rem; transform: translateX(100%); transition: transform .3s var(--ease);
    overflow-y: auto;
  }
  html.js .site-nav.is-open { transform: translateX(0); box-shadow: var(--shadow); }
  html.js .site-nav > * { padding-block: .85rem; border-bottom: 1px solid var(--line); }
  html.js .navgroup > summary { justify-content: space-between; }
  html.js .navmenu { position: static; border: 0; box-shadow: none; padding: .4rem 0 0 .6rem; min-width: 0; }
  html.js .nav-lang { border-left: 0; padding-left: 0; }
}

/* 17 — Reduced motion ------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}
