/* ==========================================================================
   KID RESILIENT — design system
   Brand: bold, hand-drawn energy + corporate-credible trust signals
   Palette: ink black, scarlet red, off-white
   Type: Anton (display) / Permanent Marker (accent) / Inter (body)
   NOTE: placeholder assets live in /assets — swap with real Canva exports.
   ========================================================================== */

/* Kid Resilient brand script (self-hosted, matches the wordmark) */
@font-face {
  font-family: "Reklame Script";
  src: url("assets/Fonts/Reklame-Script-Bold.otf") format("opentype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0c0c0d;
  --ink-2: #141416;
  --ink-3: #1c1c1f;
  --red: #e4231d;
  --red-dark: #b51812;
  --paper: #ffffff;
  --paper-dim: #ffffff;
  --muted: #d7d5d0;
  --line: rgba(255, 255, 255, 0.10);
  --maxw: 1180px;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-accent: "Reklame Script", "Yellowtail", "Permanent Marker", cursive;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;   /* contain decorative diamonds; clip keeps sticky nav working */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.center { text-align: center; }
.eyebrow {
  font-family: var(--font-accent);
  color: var(--red);
  font-size: 22px;
  letter-spacing: .5px;
  margin: 0 0 14px;
  display: inline-block;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.02; letter-spacing: .5px; text-transform: uppercase; margin: 0 0 18px; }
h1 { font-size: clamp(44px, 7vw, 92px); }
h2 { font-size: clamp(32px, 4.6vw, 60px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); }
p { margin: 0 0 18px; }
.lead { font-size: clamp(19px, 2vw, 23px); color: var(--paper); }
.dim { color: var(--paper-dim); }
.red { color: var(--red); }
.hl { color: var(--red); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 16px;
  letter-spacing: .3px; padding: 16px 28px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--red); color: var(--red); }
.btn--dark { background: var(--ink); color: var(--paper); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 12, 13, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 22px; letter-spacing: 1px; }
.nav__logo .mark {
  width: 34px; height: 34px; border: 2px solid var(--red); transform: rotate(45deg);
  display: grid; place-items: center;
}
.nav__logo .mark span { transform: rotate(-45deg); color: var(--red); font-size: 13px; font-family: var(--font-display); }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: 15px; font-weight: 600; color: var(--paper-dim); transition: color .2s; }
.nav__links a:hover, .nav__links a.active { color: var(--paper); }
.nav__toggle { display: none; background: none; border: 0; color: var(--paper); font-size: 26px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(680px 640px at 74% 50%, rgba(228, 35, 29, 0.40), transparent 66%),
    radial-gradient(900px 520px at 82% 12%, rgba(228, 35, 29, 0.16), transparent 62%),
    linear-gradient(180deg, var(--ink), var(--ink-2));
  z-index: 0;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero__title span.script { font-family: var(--font-accent); color: var(--red); text-transform: none; display: block; font-size: clamp(40px, 6vw, 80px); transform: rotate(-2deg); margin-bottom: -6px; }
.hero__sub { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(20px, 2.3vw, 30px); color: var(--paper); letter-spacing: .5px; margin: 6px 0 22px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero__photo {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--ink-3), #000);
  aspect-ratio: 4 / 5; box-shadow: var(--shadow);
  display: grid; place-items: center; border: 1px solid var(--line);
}
.hero__photo .placeholder { text-align: center; color: var(--muted); padding: 24px; font-size: 14px; }
.hero__photo .placeholder .big { font-family: var(--font-display); font-size: 26px; color: var(--paper-dim); display: block; margin-bottom: 8px; text-transform: uppercase; }

/* ---------- stat strip ---------- */
.stats { background: var(--red); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 40px 0; }
.stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); line-height: 1; }
.stat .lbl { font-size: 15px; font-weight: 600; opacity: .95; }

/* ---------- problem ---------- */
.pressures { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.pressures span {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  font-size: 14px; font-weight: 600; color: var(--paper-dim); background: var(--ink-2);
}
.bigquote {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(28px, 4vw, 52px); line-height: 1.05; margin: 8px 0;
}
.bigquote .red { color: var(--red); }

/* ---------- story (kid resilient) ---------- */
.story { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.story__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.story__mark { aspect-ratio: 1; border: 2px solid var(--red); transform: rotate(45deg); display: grid; place-items: center; max-width: 280px; margin: 0 auto; }
.story__mark .inner { transform: rotate(-45deg); text-align: center; }
.story__mark .inner .k { font-family: var(--font-display); color: var(--red); font-size: 46px; line-height: .9; }

/* ---------- grit & grace (split panel: one red, one black) ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.duo .card { border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; background: var(--ink-2); }
.duo .card h3 { color: var(--red); }
.duo .card .tag { font-family: var(--font-accent); color: var(--muted); font-size: 18px; }

.split { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split__half { position: relative; overflow: hidden; padding: 64px 52px; min-height: 360px; display: flex; flex-direction: column; justify-content: center; }
.split__half--grit { background: linear-gradient(155deg, var(--red), var(--red-dark)); color: #fff; }
.split__half--grace { background: var(--ink-2); border: 1px solid var(--line); color: var(--paper); }
.split .kicker { font-family: var(--font-accent); font-size: 21px; margin-bottom: 4px; position: relative; z-index: 1; }
.split__half--grit .kicker { color: rgba(255,255,255,.9); }
.split__half--grace .kicker { color: var(--red); }
.split__title { font-family: var(--font-display); text-transform: uppercase; line-height: .92;
  font-size: clamp(52px, 7vw, 96px); margin: 0 0 18px; position: relative; z-index: 1; }
.split__half p { position: relative; z-index: 1; max-width: 32ch; font-size: 17px; margin: 0; }
.split__half--grit p { color: rgba(255,255,255,.94); }
.split__dia { position: absolute; right: -50px; bottom: -55px; width: 270px; height: auto; opacity: .16; pointer-events: none; z-index: 0; }
.split__dia polygon { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.split__half--grit .split__dia polygon { stroke: #fff; }
.split__half--grace .split__dia polygon { stroke: var(--red); opacity: .8; }

/* ---------- About page spruce-up ---------- */
.about-hero { position: relative; overflow: hidden; }
.about-hero::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(620px 560px at 27% 48%, rgba(228,35,29,.34), transparent 66%); }
.about-hero .wrap { position: relative; z-index: 1; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.about-stats .st { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); padding: 30px 24px; text-align: center; transition: transform .2s ease, border-color .2s ease; }
.about-stats .st:hover { transform: translateY(-4px); border-color: rgba(228,35,29,.45); }
.about-stats .st .n { font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 54px); color: var(--red); line-height: 1; }
.about-stats .st .l { font-size: 14px; color: var(--paper-dim); margin-top: 10px; }
@media (max-width: 700px) { .about-stats { grid-template-columns: 1fr; } }

/* ---------- SPEAR ---------- */
.spear { background: var(--ink-2); }
.spear__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 36px; }
.spear .pillar { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 18px; background: var(--ink); transition: transform .15s ease, border-color .2s; }
.spear .pillar:hover { transform: translateY(-4px); border-color: var(--red); }
.spear .pillar .letter { font-family: var(--font-display); font-size: 46px; color: var(--red); line-height: 1; }
.spear .pillar h3 { font-size: 20px; margin: 10px 0 8px; }
.spear .pillar p { font-size: 14px; color: var(--paper-dim); margin: 0; }

/* ---------- proof ---------- */
.logos { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: center; opacity: .8; margin-top: 18px; }
.logos .logo-ph { font-family: var(--font-display); font-size: 24px; color: var(--paper-dim); letter-spacing: 1px; border: 1px dashed var(--line); padding: 10px 18px; border-radius: 8px; }
.quotes { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 40px; }
.quote { flex: 1 1 300px; max-width: 360px; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--ink-2); }
.quote p { font-size: 17px; }
.quote .who { font-weight: 700; font-size: 15px; }
.quote .who span { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.quote .stars { color: var(--red); letter-spacing: 2px; margin-bottom: 12px; }

/* ---------- meet chris ---------- */
.chris__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; }
.chris__photo { aspect-ratio: 1; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--ink-3), #000); display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- services teaser ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.tier { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; background: var(--ink-2); display: flex; flex-direction: column; }
.tier.featured { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.tier .badge { font-family: var(--font-accent); color: var(--red); font-size: 17.6px; margin-bottom: 8px; }
.tier h3 { margin-bottom: 6px; }
.tier .price { font-family: var(--font-display); font-size: 34px; color: var(--paper); margin: 12px 0 4px; }
.tier .price small { font-size: 14px; color: var(--muted); font-family: var(--font-body); }
.tier ul { list-style: none; padding: 0; margin: 16px 0 24px; }
.tier li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--paper-dim); }
.tier li::before { content: "→ "; color: var(--red); font-weight: 700; }
.tier .btn { margin-top: auto; justify-content: center; }

/* ---------- final cta ---------- */
.cta-band { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band .btn--primary { background: #fff; color: var(--red); }
.cta-band .btn--primary:hover { background: var(--ink); color: #fff; }

/* ---------- contact form ---------- */
.form { display: grid; gap: 16px; max-width: 620px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { font-size: 14px; font-weight: 600; color: var(--paper-dim); display: block; margin-bottom: 6px; }
.form input, .form textarea, .form select {
  width: 100%; background: var(--ink-2); border: 1px solid var(--line); color: var(--paper);
  padding: 14px 16px; border-radius: 10px; font-family: var(--font-body); font-size: 16px;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--red); }
.contact__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
.contact__details { display: grid; gap: 18px; }
.contact__details .item { display: flex; gap: 14px; align-items: flex-start; }
.contact__details .item .k { font-family: var(--font-accent); color: var(--red); font-size: 17.6px; }

/* ---------- footer ---------- */
.footer { background: #000; border-top: 1px solid var(--line); padding: 56px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer h4 { font-family: var(--font-display); text-transform: uppercase; font-size: 18px; margin: 0 0 14px; }
.footer a { color: var(--paper-dim); font-size: 15px; display: block; padding: 4px 0; }
.footer a:hover { color: var(--red); }
.footer__bottom { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- utility ---------- */
.maxprose { max-width: 720px; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }

/* ---------- real brand assets ----------
   logo.png / wordmark.png are now true transparent PNGs (black -> alpha). */
.nav__logoimg { height: 44px; width: auto; display: block; }
.footer .nav__logoimg { height: 56px; margin-bottom: 16px; }
.hero__wordmark { width: min(440px, 82%); height: auto; margin: 0 0 6px -6px; display: block; }
.story__logo { width: min(290px, 80%); height: auto; margin: 0 auto; display: block; }
/* Chris is a transparent cutout floating over a red glow (no box) */
.hero__photo { position: relative; background: transparent; border: 0; box-shadow: none; aspect-ratio: 4 / 5; overflow: visible; }
.hero__img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }
.chris__photo { position: relative; padding: 0; overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; display: grid; place-items: end center; aspect-ratio: 4 / 5; }
.chris__photo::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(56% 50% at 50% 44%, rgba(228,35,29,.42), rgba(228,35,29,.10) 46%, transparent 72%); }
.chris__photo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }

/* client logo row */
.logos img { height: 44px; width: auto; opacity: 1; transition: transform .2s ease; }
.logos .logo-img:hover { opacity: 1; transform: translateY(-2px); }

/* ---------- motion: float + reveal-on-scroll ---------- */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin-slow { to { transform: rotate(405deg); } }      /* starts at 45deg (diamond) */
@keyframes spin-slow-rev { to { transform: rotate(-315deg); } }

html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
html.js .stagger.in > * { opacity: 1; transform: none; }
html.js .stagger.in > *:nth-child(2) { transition-delay: .08s; }
html.js .stagger.in > *:nth-child(3) { transition-delay: .16s; }
html.js .stagger.in > *:nth-child(4) { transition-delay: .24s; }
html.js .stagger.in > *:nth-child(5) { transition-delay: .32s; }
html.js .stagger.in > *:nth-child(6) { transition-delay: .40s; }

/* ---------- diamond motif (true Kid Resilient flat-diamond shape) ---------- */
.kr-diamond { position: absolute; pointer-events: none; z-index: 0;
  transform: translate(-50%, -50%);          /* base centring (used when animation is off) */
  animation: kr-drift 80s linear infinite;   /* continuous drift, compositor-driven */
  will-change: transform; }
@keyframes kr-drift {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
.kr-diamond polygon { fill: none; stroke: rgba(228,35,29,.30); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.kr-diamond polygon + polygon { stroke: rgba(228,35,29,.16); }
.kr-diamond--hero { width: 122%; left: 50%; top: 47%; }
.kr-diamond--mid { width: 110%; left: 50%; top: 44%; }
.kr-diamond--spear { width: min(720px, 86%); left: 50%; top: 44%; }
.kr-diamond--spear polygon { stroke: rgba(228,35,29,.24); stroke-width: 2; }

/* "The theory" — more room to breathe */
.theory h2 { margin-bottom: 26px; }
.theory .pressures { margin: 30px 0 26px; gap: 14px; }
.theory .pressures span { padding: 10px 18px; }
.theory p.dim { margin-bottom: 24px; line-height: 1.75; }
.theory .bigquote { margin: 40px 0; }

/* SPEAR — bring the background to life */
.spear { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--ink), var(--ink-2) 40%, var(--ink)); }
.spear::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(70% 60% at 50% 22%, rgba(228,35,29,.22), transparent 68%); }
.spear .wrap { position: relative; z-index: 1; }
.spear .pillar { position: relative; overflow: hidden; }
.spear .pillar::after { content: ""; position: absolute; right: -26px; bottom: -26px; width: 90px; height: 90px;
  background: var(--red); opacity: .07; transform: rotate(45deg); transition: opacity .2s ease, transform .2s ease; }
.spear .pillar:hover::after { opacity: .16; transform: rotate(45deg) scale(1.15); }
.diamond-divider { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 8px 0; }
.diamond-divider::before, .diamond-divider::after { content: ""; height: 1px; width: min(120px, 22vw); background: linear-gradient(90deg, transparent, var(--line)); }
.diamond-divider i { width: 18px; height: 11px; background: var(--red); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); display: block; }

/* the hand-drawn Kid Resilient wordmark, set in the marker accent font */
.hero__script { display: block; font-family: var(--font-accent); color: var(--red);
  font-size: clamp(42px, 6.5vw, 84px); line-height: .95; transform: rotate(-2deg);
  margin: 0 0 10px -2px; text-shadow: 2px 3px 0 rgba(0,0,0,.35); }

/* extra micro-interactions for a bit more life */
.quote, .tier { transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.quote:hover, .tier:hover { transform: translateY(-5px); border-color: rgba(228,35,29,.45); }
.nav__links a:not(.btn) { position: relative; }
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: var(--red); transition: width .25s ease; }
.nav__links a:not(.btn):hover::after, .nav__links a.active:not(.btn)::after { width: 100%; }
.stat .num { display: inline-block; transition: transform .25s ease; }
.stat:hover .num { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal, html.js .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero__img, .kr-diamond { animation: none !important; }
}

/* ---------- responsive ---------- */
/* ---- tablet / medium (<=900px): keep Chris beside the headline; tidy the grids ---- */
@media (max-width: 900px) {
  /* hero + Chris stay two-column here (Chris to the right of the text) */
  .hero__grid { gap: 28px; }
  .chris__grid { gap: 32px; }
  .story__grid { gap: 32px; }
  /* SPEAR's 5 items never grid evenly (2+2+1 looks messy) -> clean single column */
  .spear__grid { grid-template-columns: 1fr; }
  .quotes, .tiers { grid-template-columns: 1fr; }
  .duo, .split { grid-template-columns: 1fr; }
  .split__half { padding: 44px 30px; min-height: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .nav__links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--ink-2); padding: 18px 24px; border-bottom: 1px solid var(--line); gap: 6px; }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 10px 0; }
  .nav__toggle { display: block; }
  .form .row { grid-template-columns: 1fr; }
}

/* ---- phones (<=620px): now stack hero/Chris under the text, sized sensibly ---- */
@media (max-width: 620px) {
  .hero__grid, .story__grid, .chris__grid, .contact__grid { grid-template-columns: 1fr; }
  .hero__photo, .chris__photo { aspect-ratio: 4 / 5; max-height: 440px; }
  .stats__grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 64px 0; }
  .wrap { padding: 0 18px; }
  h1 { font-size: clamp(40px, 11vw, 60px); }
  .split__half { padding: 38px 26px; }
}
