/*
Theme Name: Extendable
Theme URI: https://pataka.me
Author: Boock Consulting
Description: Block theme for the Pātaka site. Colours, type and spacing come from the Pātaka design system tokens. Edit sections as block patterns in the Site Editor.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: pataka
WPVibe: yes
Update URI: false
*/

@import url("https://fonts.googleapis.com/css2?family=Newsreader:wght@500;600&family=Source+Sans+3:wght@400;600;700&family=IBM+Plex+Mono:wght@400&display=swap");

/* Tokens (design system: tokens.json). Light by default, dark follows the system, data-theme overrides both. */
:root {
  --pk-surface: #fbfaf7; --pk-surface-raised: #ffffff; --pk-ink: #1d2430; --pk-ink-muted: #5b6575;
  --pk-line: #e4e1da; --pk-line-strong: #7d8794; --pk-teal: #1f5f5b; --pk-on-teal: #ffffff; --pk-teal-soft: #e3efed;
  --pk-navy: #243a5e; --pk-sage: #8fbfa6; --pk-note-surface: #f6efe1; --pk-focus-ring: var(--pk-teal);
  --pk-band: #243a5e; --pk-on-band: #ffffff; --pk-on-band-muted: #c9d3e3; --pk-sage-soft: #e6f1eb; --pk-sand: #f3ead6;
  --pk-radius-card: 14px; --pk-radius-sm: 8px; --pk-radius-pill: 999px; --pk-section-pad: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pk-surface: #12161c; --pk-surface-raised: #1a2028; --pk-ink: #e8ebef; --pk-ink-muted: #a3acb9;
    --pk-line: #2b333e; --pk-line-strong: #6b7686; --pk-teal: #6fc2b9; --pk-on-teal: #0f1f1d; --pk-teal-soft: #1d2f2d;
    --pk-navy: #8fa8d0; --pk-sage: #4f8b73; --pk-note-surface: #2a2620; --pk-band: #1b2a45; --pk-on-band: #e8ebef; --pk-on-band-muted: #aab6cb; --pk-sage-soft: #1b2b25; --pk-sand: #2a2620;
  }
}
:root[data-theme="dark"] {
  --pk-surface: #12161c; --pk-surface-raised: #1a2028; --pk-ink: #e8ebef; --pk-ink-muted: #a3acb9;
  --pk-line: #2b333e; --pk-line-strong: #6b7686; --pk-teal: #6fc2b9; --pk-on-teal: #0f1f1d; --pk-teal-soft: #1d2f2d;
  --pk-navy: #8fa8d0; --pk-sage: #4f8b73; --pk-note-surface: #2a2620; --pk-band: #1b2a45; --pk-on-band: #e8ebef; --pk-on-band-muted: #aab6cb; --pk-sage-soft: #1b2b25; --pk-sand: #2a2620;
}
@media (max-width: 560px) { :root { --pk-section-pad: 44px; } }

body { -webkit-font-smoothing: antialiased; }
:where(a, button, summary, .wp-block-button__link):focus-visible { outline: 2px solid var(--pk-focus-ring); outline-offset: 2px; }
.wp-block-post-content a, .pk-intro a, .pk-card a { text-decoration: underline; text-underline-offset: 2px; }

/* Header and footer */
.pk-header { background: var(--pk-surface-raised); border-bottom: 4px solid var(--pk-sage); padding: 14px 20px; margin: 0; max-width: none; }
.pk-header-inner { align-items: center; gap: 12px; max-width: 1040px; margin: 0 auto; }
.pk-logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.pk-mark { display: block; flex: none; width: 40px; height: 40px; }
.pk-mark .a { fill: var(--pk-navy); }
.pk-mark .b { fill: var(--pk-sage); }
.pk-wordmark { font-family: var(--wp--preset--font-family--display); font-size: 1.75rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; color: var(--pk-navy); }
.pk-nav { display: flex; gap: 24px; margin-left: auto; margin-right: 12px; }
.pk-nav a { color: var(--pk-ink-muted); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
.pk-nav a:hover { color: var(--pk-teal); text-decoration: underline; }
.pk-header .wp-block-button__link { padding: 8px 16px; font-size: 0.9375rem; }
@media (max-width: 640px) { .pk-wordmark { font-size: 1.5rem; } .pk-mark { width: 34px; height: 34px; } .pk-nav { display: none; } .pk-header-inner { justify-content: space-between; } }
.pk-footer { background: var(--pk-band); color: var(--pk-on-band); border-top: 4px solid var(--pk-sage); padding: 40px 20px; margin: 0; }
.pk-footer-inner { max-width: 1040px; margin: 0 auto; display: grid; gap: 4px; }
.pk-fine { font-size: 0.875rem; line-height: 1.5; color: var(--pk-on-band-muted); margin: 0; }
.pk-fine a { color: var(--pk-on-band); }
.pk-footer .pk-mark .a { fill: var(--pk-on-band); }
.pk-footer .pk-wordmark { color: var(--pk-on-band); }

/* Sections */
.pk-main { margin: 0; padding: 0; }
.pk-main.pk-page { padding: var(--pk-section-pad) 20px; max-width: 760px; margin: 0 auto; }
.pk-section { padding: var(--pk-section-pad) 20px; margin: 0; }
body { padding-left: 0 !important; padding-right: 0 !important; }
.pk-section { padding-left: max(20px, calc((100% - 1040px) / 2)); padding-right: max(20px, calc((100% - 1040px) / 2)); }
.pk-section > * { max-width: 1040px; margin-left: 0 !important; margin-right: 0 !important; }
.wp-block-button__link, .wp-block-button__link:hover { text-decoration: none !important; }
.pk-raised { background: var(--pk-surface-raised); border-top: 1px solid var(--pk-line); border-bottom: 1px solid var(--pk-line); }
.pk-hero { padding-top: calc(var(--pk-section-pad) + 8px); }
.pk-hero > h1 { max-width: 820px; }
.pk-lead { font-size: var(--wp--preset--font-size--lead); line-height: 1.5; color: var(--pk-ink-muted); max-width: 720px; }
.pk-intro { color: var(--pk-ink-muted); margin-bottom: 32px; max-width: 720px; }
.pk-tag { display: inline-block; font-size: 0.875rem; line-height: 1.3; font-weight: 600; color: var(--pk-teal); background: var(--pk-teal-soft); padding: 4px 12px; border-radius: var(--pk-radius-pill); width: fit-content; }
.pk-soon { font-size: 0.875rem; font-weight: 600; color: var(--pk-ink-muted); margin-left: 6px; }

/* Cards, steps, notes */
.pk-grid { gap: 18px; }
.pk-card { background: var(--pk-surface-raised); border: 1px solid var(--pk-line); border-radius: var(--pk-radius-card); padding: 22px; }
.pk-raised .pk-card { background: var(--pk-surface); }
.pk-card h3 { margin: 0 0 4px; }
.pk-card p, .pk-card li { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--pk-ink-muted); }
.pk-card ul { margin: 0; padding-left: 1.1em; }
.pk-wide { max-width: 1040px; }
.pk-main { counter-reset: pk-step; }
.pk-grid:has(.pk-step) { counter-reset: pk-step; }
.pk-step { position: relative; padding-left: 66px; counter-increment: pk-step; }
.pk-step::before { content: counter(pk-step); position: absolute; left: 20px; top: 20px; width: 32px; height: 32px; border-radius: 50%; background: var(--pk-teal); color: var(--pk-on-teal); display: grid; place-items: center; font-weight: 700; line-height: 1; }
.pk-note { background: var(--pk-note-surface); border-radius: var(--pk-radius-card); padding: 16px 20px; margin-top: 18px; }
.pk-note p { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--pk-ink-muted); }

/* Buttons */
.wp-block-button__link { border: 1.5px solid var(--pk-teal); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--pk-teal); border: 1.5px solid var(--pk-teal); }
.wp-block-buttons { gap: 12px; margin-top: 8px; }

/* FAQ (core Details block) */
.wp-block-details { border-bottom: 1px solid var(--pk-line); padding: 14px 0; }
.wp-block-details summary { cursor: pointer; font-weight: 600; list-style: none; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; float: right; color: var(--pk-teal); font-weight: 700; }
.wp-block-details[open] summary::after { content: "\2013"; }
.wp-block-details p { margin: 10px 0 0; font-size: 1rem; line-height: 1.5; color: var(--pk-ink-muted); }

code, kbd, samp { font-family: var(--wp--preset--font-family--mono); font-size: 0.875rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Colour bands (section backgrounds) */
.pk-sand { background: var(--pk-sand); }
.pk-tint { background: var(--pk-teal-soft); }
.pk-sage { background: var(--pk-sage-soft); }
.pk-sand .pk-card, .pk-tint .pk-card, .pk-sage .pk-card { background: var(--pk-surface-raised); }
.pk-band { background: var(--pk-band); color: var(--pk-on-band); position: relative; overflow: hidden; }
.pk-band h1, .pk-band h2, .pk-band h3 { color: var(--pk-on-band); }
.pk-band .pk-lead, .pk-band .pk-intro { color: var(--pk-on-band-muted); }
.pk-band .pk-tag { background: var(--pk-sage); color: var(--pk-band); }
.pk-band .pk-card { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.pk-band .pk-card p { color: var(--pk-on-band-muted); }
.pk-band .wp-block-button__link { background: var(--pk-sage); border-color: var(--pk-sage); color: var(--pk-band); }
.pk-band .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--pk-on-band); border-color: var(--pk-on-band); }
.pk-hero-mark { position: absolute; right: max(20px, calc(50% - 520px)); top: 50%; transform: translateY(-50%); width: min(300px, 32vw); height: auto; opacity: 0.9; }
.pk-hero { position: relative; overflow: hidden; }
.pk-hero .pk-tag { font-size: 1.25rem; padding: 8px 20px; background: var(--pk-teal); color: var(--pk-on-teal); }
.pk-hero-mark .a { fill: var(--pk-teal); opacity: 1; }
.pk-hero-mark .b { fill: var(--pk-sage); }
.pk-hero > h1, .pk-hero > .pk-lead { position: relative; max-width: 600px; }
@media (max-width: 760px) { .pk-hero-mark { display: none; } }
.pk-teal-band { background: var(--pk-teal); color: var(--pk-on-teal); }
.pk-teal-band h2 { color: var(--pk-on-teal); }
.pk-teal-band .pk-intro, .pk-teal-band p { color: var(--pk-on-teal); }
.pk-teal-band a { color: var(--pk-on-teal); }
.pk-form { background: var(--pk-surface-raised); border-radius: var(--pk-radius-card); padding: 24px; }
.pk-teal-band .pk-form p, .pk-teal-band .pk-form label { color: var(--pk-ink); }
.pk-teal-band .pk-form a { color: var(--pk-teal); }
.pk-section[id] { scroll-margin-top: 90px; }
