/* ColorWithHarry — front-end styles */
:root{
  --bg:#fff; --surface:#fff; --ink:#16306b; --ink-soft:#5b6b8c; --line:#e6ecf7;
  --blue:#2b7fff; --blue-dark:#1666e0; --pink:#ff4f8b; --yellow:#ffc734;
  --green:#22c55e; --purple:#8b5cf6; --orange:#ff8a3d;
  --cream:#fff7e8; --sky:#e8f3ff; --card:#fff;
  --shadow:0 6px 20px rgba(25,60,120,.08);
  --shadow-lg:0 14px 34px rgba(25,60,120,.13);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:"Nunito",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased}
img{max-width:100%}
a{color:inherit;text-decoration:none}
button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
h1,h2,h3{font-family:"Baloo 2",cursive;margin:0;line-height:1.12;letter-spacing:-.01em}
:focus-visible{outline:3px solid var(--blue);outline-offset:3px;border-radius:8px}
.wrap{width:min(1150px,92vw);margin:0 auto}
.wrap.narrow{width:min(760px,92vw)}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* header */
.header{position:sticky;top:0;z-index:50;background:var(--surface);border-bottom:1px solid var(--line)}
.header-in{display:flex;align-items:center;gap:22px;padding:10px 0;justify-content:space-between;position:relative}
.logo{display:block;flex-shrink:0}
.logo svg{display:block;height:64px;width:auto}
.nav{display:flex;gap:26px;margin-left:auto}
.nav a{font-weight:700;font-size:15px;color:var(--ink-soft);padding:6px 2px;position:relative}
.nav a:hover,.nav a.is-active{color:var(--blue)}
.nav a.is-active::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:3px;border-radius:3px;background:var(--blue)}
.search{position:relative;flex-shrink:0}
.search input{width:260px;padding:11px 50px 11px 18px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:14.5px;font-weight:600}
.search input::placeholder{color:#9aa8c2;font-weight:600}
.search button{position:absolute;right:4px;top:4px;width:36px;height:36px;border-radius:50%;background:var(--blue);display:grid;place-items:center;color:#fff}
.burger{display:none;width:42px;height:42px;border-radius:12px;border:1px solid var(--line);place-items:center}
.suggest{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-lg);overflow:hidden;z-index:60}
.suggest a{display:flex;justify-content:space-between;gap:12px;padding:10px 16px;font-weight:700;font-size:14.5px}
.suggest a:hover,.suggest a:focus{background:var(--sky)}
.suggest small{color:var(--ink-soft);font-weight:700}

/* hero */
.hero{position:relative;overflow:hidden;background:radial-gradient(900px 420px at 88% 8%,#d9edff 0,transparent 60%),linear-gradient(120deg,#f4f0ff 0,#eaf4ff 42%,#fff5e6 100%)}
.hero-in{display:grid;grid-template-columns:1fr 1.02fr;gap:24px;align-items:center;padding:34px 0 0}
.hero h1{font-size:clamp(38px,5.1vw,60px);color:#16306b;font-weight:800}
.hero p{color:#3d4d70;font-size:17px;max-width:44ch;margin:16px 0 26px;font-weight:600}
.cta-row{display:flex;flex-wrap:wrap;gap:14px;align-items:center}
.btn{display:inline-flex;align-items:center;gap:10px;font-family:"Baloo 2",cursive;font-weight:700;font-size:17px;padding:13px 26px;border-radius:999px}
.btn-primary{background:var(--blue);color:#fff;box-shadow:0 8px 18px rgba(43,127,255,.32)}
.btn-primary:hover{background:var(--blue-dark)}
.btn-ghost{background:#fff;color:#16306b;border:2px solid #d9e6fb}
.btn-ghost:hover{border-color:var(--pink)}
.btn-outline{display:inline-flex;align-items:center;gap:8px;border:2px solid #cfe1fb;color:var(--blue);background:var(--surface);padding:10px 20px;border-radius:999px;font-family:"Baloo 2",cursive;font-weight:700;font-size:16px}
.btn-outline:hover{background:var(--blue);color:#fff;border-color:var(--blue)}
.badges{display:flex;flex-wrap:wrap;gap:12px 26px;margin:26px 0 30px}
.badge{display:flex;align-items:center;gap:9px;font-weight:700;font-size:14.5px;color:#2b3c5e}
.badge i{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;flex:none}
.hero-art{align-self:end}
.hero-art svg{display:block;width:100%;height:auto}

/* sections */
.section{padding:52px 0}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}
.section-head h2{font-size:clamp(27px,3.2vw,34px);font-weight:800}
.section-head p{margin:5px 0 0;color:var(--ink-soft);font-weight:600;font-size:15.5px}
.crumbs{background:var(--surface);border-bottom:1px solid var(--line);padding:12px 0;font-weight:700;font-size:14px;color:var(--ink-soft)}
.crumbs a:hover{color:var(--blue)}
.cat-badge{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:12px;font-size:24px;vertical-align:-10px;margin-right:6px}

/* categories */
.cats{display:grid;grid-template-columns:repeat(8,1fr);gap:14px}
.cats-wide{grid-template-columns:repeat(4,1fr);gap:18px}
.cat{background:var(--card);border-radius:16px;text-align:center;transition:transform .16s ease;display:block}
.cat:hover{transform:translateY(-4px)}
.cat .tile{border-radius:16px;padding:20px 8px;font-size:40px;line-height:1;display:grid;place-items:center}
.cat span{display:block;font-family:"Baloo 2",cursive;font-weight:700;font-size:15px;margin-top:9px}
.cat small{display:block;color:var(--ink-soft);font-weight:700;font-size:12.5px}

/* page cards */
.popular{background:var(--sky)}
.pages{display:grid;grid-template-columns:repeat(6,1fr);gap:16px}
.page-card{background:var(--card);border-radius:14px;padding:12px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:10px;transition:transform .16s ease,box-shadow .16s ease}
.page-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg)}
.page-card .art{background:#fff;border-radius:9px;aspect-ratio:1/.92;display:grid;place-items:center;overflow:hidden}
.page-card .art svg{width:88%;height:88%}
.page-card .art img{width:100%;height:100%;object-fit:contain}
.page-card h3{font-size:17px;font-weight:700}
.page-card h3 a:hover{color:var(--blue)}
.page-meta{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:var(--ink-soft);font-weight:700;margin-top:auto}
.like{display:inline-flex;align-items:center;gap:5px;color:var(--ink-soft)}
.like svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
.like.on{color:var(--pink)}
.like.on svg{fill:var(--pink);stroke:var(--pink)}
.like-big svg{width:20px;height:20px}
.empty{grid-column:1/-1;text-align:center;padding:26px;font-weight:700;color:var(--ink-soft)}
.pager{display:flex;gap:8px;justify-content:center;margin-top:30px;flex-wrap:wrap}
.pager a{min-width:40px;text-align:center;padding:8px 12px;border-radius:10px;background:#fff;font-weight:800;color:var(--ink-soft);box-shadow:var(--shadow)}
.pager a.on,.pager a:hover{background:var(--blue);color:#fff}
.sorter select{padding:10px 14px;border-radius:999px;border:2px solid #cfe1fb;font-weight:700;color:var(--blue);background:#fff}

/* detail page */
.detail-in{display:grid;grid-template-columns:1.05fr 1fr;gap:34px;align-items:start}
.sheet{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:var(--shadow);display:grid;place-items:center;aspect-ratio:1/1.1}
.sheet img,.sheet svg{max-width:100%;max-height:100%;object-fit:contain}
.detail-info h1{font-size:clamp(28px,3.6vw,38px);font-weight:800;margin-bottom:10px}
.lede{color:var(--ink-soft);font-weight:600;font-size:17px;max-width:48ch}
.facts{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin:24px 0 28px;padding:0}
.facts div{background:var(--sky);border-radius:12px;padding:12px 16px}
.facts dt{font-size:12.5px;font-weight:700;color:var(--ink-soft);margin:0}
.facts dd{margin:2px 0 0;font-family:"Baloo 2",cursive;font-weight:700;font-size:18px}

/* articles & forms */
.article h1{font-size:clamp(30px,4vw,42px);font-weight:800;margin-bottom:14px}
.article h2{font-size:24px;font-weight:700;margin:28px 0 8px}
.article p{color:#3d4d70;font-weight:600}
.article a{color:var(--blue);font-weight:700}
.form-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:var(--shadow);display:grid;gap:16px;margin-top:18px}
.form-card label{display:grid;gap:6px;font-weight:700;font-size:14.5px}
.form-card input,.form-card textarea{padding:11px 14px;border:1px solid var(--line);border-radius:12px;font:inherit;font-weight:600}
.note{padding:12px 16px;border-radius:12px;font-weight:700}
.note.ok{background:#e3f8ea;color:#166534}
.note.bad{background:#ffe5ec;color:#9f1239}

/* why + band + footer */
.why{background:var(--cream)}
.why-grid{display:grid;grid-template-columns:repeat(4,1fr);text-align:center}
.why-item{padding:0 26px;position:relative}
.why-item+.why-item::before{content:"";position:absolute;left:0;top:14%;bottom:14%;width:1px;background:rgba(22,48,107,.12)}
.why-item .ic{font-size:42px;line-height:1;margin-bottom:12px}
.why-item h3{font-size:21px;font-weight:800;margin-bottom:6px}
.why-item p{margin:0 auto;color:var(--ink-soft);font-weight:600;font-size:15px;max-width:22ch}
.band{background:var(--cream);overflow:hidden}
.band svg{display:block;width:100%;height:auto}
.footer{background:var(--surface);border-top:1px solid var(--line);padding:22px 0}
.footer-in{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.footer nav{display:flex;gap:24px;flex-wrap:wrap}
.footer nav a{font-weight:700;font-size:14.5px;color:var(--ink-soft)}
.footer nav a:hover{color:var(--blue)}
.social{display:flex;gap:12px}
.social a{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:#fff}
.copy{text-align:right;color:var(--ink-soft);font-size:13.5px;font-weight:600;line-height:1.5}

@media (max-width:1000px){
  .cats{grid-template-columns:repeat(4,1fr)}
  .cats-wide{grid-template-columns:repeat(3,1fr)}
  .pages{grid-template-columns:repeat(3,1fr)}
  .why-grid{grid-template-columns:repeat(2,1fr);gap:30px 0}
  .why-item:nth-child(3)::before{display:none}
  .hero-in{grid-template-columns:1fr;padding-top:26px}
  .hero-art{max-width:520px;margin:0 auto}
  .detail-in{grid-template-columns:1fr}
}
@media (max-width:760px){
  .nav,.search{display:none}
  .nav.open{display:flex;position:absolute;top:100%;left:0;right:0;flex-direction:column;gap:0;background:var(--surface);border-bottom:1px solid var(--line);padding:6px 4vw 14px;z-index:60}
  .nav.open a{padding:11px 0;border-bottom:1px solid var(--line)}
  .burger{display:grid}
  .logo svg{height:52px}
  .cats,.cats-wide{grid-template-columns:repeat(2,1fr)}
  .pages{grid-template-columns:repeat(2,1fr)}
  .section{padding:40px 0}
  .section-head{flex-direction:column;align-items:flex-start}
  .why-grid{grid-template-columns:1fr}
  .why-item::before{display:none!important}
  .footer-in{flex-direction:column;text-align:center}
  .copy{text-align:center}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

@media print{
  .header,.band,.footer,.crumbs,.cta-row,.facts,.popular,.detail-info{display:none!important}
  .sheet{border:0;box-shadow:none;padding:0;aspect-ratio:auto}
  body{background:#fff}
}
