/*
Theme Name:   IPTV Kopen 365
Theme URI:    https://iptvkopen365.nl
Description:  Standalone theme for IPTV Kopen 365. Carries the entire design layer, so the site has no page-builder and no parent-theme dependency and renders correctly with every plugin deactivated.
Author:       IPTV Kopen 365
Version:      0.1.0
Text Domain:  kopen365
*/

/* ==========================================================================
   Design tokens
   NO colour or font literal belongs in this file. Every --brand/--ink/--font
   value is generated from content/brand.mjs into inc/brand.php and printed as
   :root custom properties by functions.php. scripts/build.mjs FAILS the build
   if it finds a six-digit hex here that brand.mjs did not define.
   ========================================================================== */

:root {
	--shadow:    0 1px 2px rgba(16,24,40,.06), 0 4px 12px rgba(16,24,40,.05);
	--shadow-lg: 0 2px 6px rgba(16,24,40,.07), 0 12px 32px rgba(16,24,40,.09);
	--gap:       clamp(1rem, 3vw, 2rem);
}

/* ----------------------------------------------------------------- base -- */

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink-3);
	background: var(--surface);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 2rem 0 .75rem; }
h1 { font-size: clamp(2rem, 5vw, 2.85rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1.1rem; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------- layout - */

.k365-wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.k365-main { padding: 2.5rem 0 4rem; }

/* ---------------------------------------------------------------- header - */

.k365-header {
	border-bottom: 1px solid var(--line);
	background: var(--surface);
	position: sticky; top: 0; z-index: 50;
}
.k365-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.k365-logo { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.k365-logo b { color: var(--brand); }
.k365-nav { margin-left: auto; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.k365-nav a { color: var(--ink-3); text-decoration: none; font-weight: 600; font-size: .95rem; }
.k365-nav a:hover { color: var(--brand); }

/* ----------------------------------------------------------------- cta --- */

/* The order flow is WhatsApp green on purpose - a recognised affordance, and
   the one element deliberately not brand-coloured. */
.k365-cta {
	display: inline-block; padding: .85rem 1.6rem; border-radius: var(--r);
	background: var(--whatsapp); color: var(--whatsapp-ink);
	font-weight: 700; text-decoration: none; border: 0; cursor: pointer;
}
.k365-cta:hover { background: var(--whatsapp-dark); color: var(--whatsapp-ink); }

.k365-cta--brand { background: var(--brand); color: var(--on-dark); }
.k365-cta--brand:hover { background: var(--brand-dark); color: var(--on-dark); }

/* --------------------------------------------------------------- tables -- */

.k365-table { overflow-x: auto; margin: 1.5rem 0; }
.k365-table table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.k365-table th, .k365-table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-align: left; }
.k365-table th { background: var(--surface-2); color: var(--ink); font-weight: 700; }

/* --------------------------------------------------------------- footer -- */

.k365-footer { background: var(--ink); color: var(--on-dark-muted); padding: 2.5rem 0; margin-top: 4rem; }
.k365-footer a { color: var(--on-dark); }
.k365-footer__note { font-size: .85rem; color: var(--on-dark-faint); }

figure { margin: 1.5rem 0; }
figcaption { font-size: .875rem; color: var(--muted); margin-top: .5rem; }
blockquote { margin: 1.5rem 0; padding: .75rem 1.25rem; border-left: 3px solid var(--brand); background: var(--brand-tint); }
blockquote p { margin: 0; color: var(--ink-2); }

/* ==========================================================================
   Sections
   Flat and solid throughout: no gradients, no glow, no glassmorphism. The
   competitor set runs dark navy heroes with electric-blue buttons; this is
   deliberately a light, high-contrast retail layout with one loud accent.
   ========================================================================== */

.k365-sec { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.k365-sec--tint { background: var(--surface-2); }
.k365-sec--dark { background: var(--ink); color: var(--on-dark-muted); }
.k365-sec--dark h2 { color: var(--on-dark); }
.k365-sec--hero { padding-top: clamp(2rem, 5vw, 3.5rem); }
.k365-sec > .k365-wrap > h2 { margin-top: 0; }

.k365-lead { font-size: 1.1rem; color: var(--ink-3); max-width: 62ch; }
.k365-fine { font-size: .9rem; color: var(--muted); margin-top: 1rem; }
.k365-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ hero - */

.k365-hero__body { max-width: 46rem; }
.k365-hero h1 { margin-top: 0; }

/* The price anchor. Brand-coloured text is safe here: the accent measures
   5.67:1 on white, so it clears AA for normal-size text in both directions. */
.k365-anchor { font-size: 1.15rem; color: var(--ink); margin: 1.25rem 0 1.5rem; }
.k365-anchor strong { color: var(--brand); font-size: 1.5rem; font-weight: 800; }
.k365-anchor span { color: var(--muted); }

.k365-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.k365-btn-ghost {
	display: inline-block; padding: .85rem 1.4rem; border-radius: var(--r);
	border: 2px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none;
}
.k365-btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.k365-cta--block { display: block; text-align: center; margin-top: 1rem; }

/* Proof row. Ticks are drawn in CSS so there is no icon-font request. */
.k365-proof { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .5rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.k365-proof li { position: relative; padding-left: 1.6rem; color: var(--ink-3); font-size: .97rem; }
.k365-proof li::before {
	content: ""; position: absolute; left: 0; top: .45em;
	width: .5rem; height: .85rem; border: solid var(--brand);
	border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ------------------------------------------------------------------ grid - */

.k365-grid { display: grid; gap: 1rem; margin-top: 1.5rem; }
.k365-grid--3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.k365-grid--4 { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

.k365-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem 1.35rem; }
.k365-card h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.k365-card p  { margin: 0; font-size: .95rem; color: var(--ink-3); }

/* ----------------------------------------------------------------- steps - */

.k365-steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); counter-reset: step; }
.k365-steps li { display: flex; gap: .9rem; align-items: flex-start; }
.k365-steps__n {
	flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 50%;
	background: var(--brand); color: var(--on-dark);
	display: grid; place-items: center; font-weight: 800; font-size: .95rem;
}
.k365-steps h3 { margin: .15rem 0 .3rem; font-size: 1.02rem; }
.k365-steps p  { margin: 0; font-size: .95rem; }

/* ----------------------------------------------------------------- plans - */

.k365-plans { margin-bottom: 2rem; }
.k365-plan {
	background: var(--surface); border: 2px solid var(--line);
	border-radius: var(--r-lg); padding: 1.4rem 1.35rem; position: relative;
}
.k365-plan--best { border-color: var(--brand); }
.k365-plan__flag {
	position: absolute; top: -.75rem; left: 1.2rem;
	background: var(--brand); color: var(--on-dark);
	font-size: .74rem; font-weight: 700; letter-spacing: .02em;
	padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase;
}
.k365-plan h3 { margin: .2rem 0 .5rem; font-size: 1.05rem; color: var(--ink-3); font-weight: 600; }
.k365-plan__price { margin: 0; font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.k365-plan__pm    { margin: .2rem 0 .6rem; color: var(--brand); font-weight: 700; font-size: .95rem; }
.k365-plan__note  { margin: 0; font-size: .85rem; color: var(--muted); }

/* ------------------------------------------------------------------- faq - */

.k365-faq { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.k365-faq details { border-bottom: 1px solid var(--line); }
.k365-faq summary {
	cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 700; color: var(--ink);
	list-style: none; position: relative;
}
.k365-faq summary::-webkit-details-marker { display: none; }
.k365-faq summary::after {
	content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
	font-size: 1.4rem; font-weight: 400; color: var(--brand); line-height: 1;
}
.k365-faq details[open] summary::after { content: "\2013"; }
.k365-faq details > div { padding: 0 2rem 1.1rem 0; }
.k365-faq details p { margin: 0; color: var(--ink-3); }

/* ------------------------------------------------------------------ band - */

.k365-band { text-align: center; max-width: 44rem; margin-inline: auto; }
.k365-band h2 { margin-top: 0; }
.k365-band p  { color: var(--on-dark-muted); margin-bottom: 1.5rem; }

/* ---------------------------------------------------------------- mobile - */

@media (max-width: 640px) {
	.k365-actions { flex-direction: column; align-items: stretch; }
	.k365-actions .k365-cta, .k365-actions .k365-btn-ghost { text-align: center; }
	.k365-nav { gap: .9rem; }
	body { font-size: 16px; }
}

/* ==========================================================================
   Header, logo, footer
   ========================================================================== */

.k365-skip {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--brand); color: var(--on-dark); padding: .7rem 1.1rem; border-radius: 0 0 var(--r) 0;
}
.k365-skip:focus { left: 0; color: var(--on-dark); }

.k365-header__inner { display: flex; align-items: center; gap: 1.25rem; min-height: 72px; }

.k365-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--brand); }
.k365-mark { width: 32px; height: 32px; flex: 0 0 auto; display: block; }
.k365-logo__text { font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.k365-logo__text b { color: var(--brand); }

/* On the dark footer band the raw accent is only 3.13:1, so the "365" switches
   to the lighter on-dark crimson (5.33:1). The tile itself is a non-text shape
   and clears the 3:1 bar unchanged. */
.k365-logo.on-dark .k365-logo__text { color: var(--on-dark); }
.k365-logo.on-dark .k365-logo__text b { color: var(--brand-on-dark); }

.k365-nav { margin-left: auto; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.k365-nav a { color: var(--ink-3); text-decoration: none; font-weight: 600; font-size: .95rem; }
.k365-nav a:hover { color: var(--brand); }
.k365-cta--sm { padding: .6rem 1.05rem; font-size: .95rem; }

.k365-article { padding: 2.5rem 0 3.5rem; max-width: 46rem; }

.k365-footer { background: var(--ink); color: var(--on-dark-muted); padding: 3rem 0 2rem; }
.k365-footer__top { display: grid; gap: 2rem; grid-template-columns: minmax(16rem, 1.4fr) 1fr; align-items: start; }
.k365-footer__brand p { margin: .9rem 0 0; font-size: .95rem; max-width: 42ch; }
.k365-footer__nav { display: grid; gap: .55rem; }
.k365-footer__nav a { color: var(--on-dark-muted); text-decoration: none; font-size: .95rem; }
.k365-footer__nav a:hover { color: var(--on-dark); }
.k365-footer__note {
	margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--ink-2);
	font-size: .85rem; color: var(--on-dark-faint); max-width: 80ch;
}

@media (max-width: 760px) {
	.k365-footer__top { grid-template-columns: 1fr; }
	.k365-header__inner { flex-wrap: wrap; min-height: 0; padding: .75rem 0; gap: .75rem; }
	.k365-nav { order: 3; width: 100%; margin-left: 0; }
	.k365-cta--sm { margin-left: auto; }
}

/* ==========================================================================
   Loose content
   Shortcode sections bring their own .k365-wrap. Raw markdown (h2/p/ul from
   content/pages/*.md) lands as a direct child of .k365-main with no wrapper,
   so without this it renders edge-to-edge at full viewport width.
   ========================================================================== */

.k365-main > h2,
.k365-main > h3,
.k365-main > p,
.k365-main > ul,
.k365-main > ol,
.k365-main > figure,
.k365-main > blockquote,
.k365-main > .k365-table {
	width: min(100% - 2rem, var(--wrap));
	margin-inline: auto;
}
.k365-main > h2 { margin-top: clamp(2rem, 4vw, 3rem); margin-bottom: .9rem; }
.k365-main > p,
.k365-main > ul,
.k365-main > ol { box-sizing: border-box; }
.k365-main > ul,
.k365-main > ol { padding-left: 1.15rem; }
.k365-main > ul li { margin-bottom: .5rem; }

/* Keep a readable measure WITHOUT centring the text. The block still spans the
   full wrap so its left edge lines up with the h2 above it; the right edge is
   padded inward instead. Centring these with margin-inline:auto looks broken -
   the paragraph starts hundreds of px right of its own heading. */
@media (min-width: 900px) {
	.k365-main > p,
	.k365-main > ul,
	.k365-main > ol { padding-right: calc(var(--wrap) - 68ch); }
	.k365-main > ul,
	.k365-main > ol { padding-left: 1.15rem; }
}

/* Nav items: items_wrap drops the <ul>, so the <li> markers must go too. */
.k365-nav ul, .k365-nav li, .k365-footer__nav ul, .k365-footer__nav li { list-style: none; margin: 0; padding: 0; }
.k365-nav li { display: inline-flex; }
