/* ==========================================================================
   PKO Palm Kernel — design system
   Botanical-industrial premium theme
   ========================================================================== */

:root {
  --green-950: #0e1b13;
  --green-900: #14261c;
  --green-800: #1b3527;
  --green-700: #28503b;
  --green-600: #35684d;
  --green-500: #4a8264;
  --green-200: #cfe0d4;
  --green-100: #e4efe7;
  --cream: #f7f4ec;
  --paper: #fffdf7;
  --gold: #c99a4b;
  --gold-dark: #a97e35;
  --amber: #d9a441;
  --ink: #1f2a22;
  --ink-soft: #4b5a50;
  --line: #e3ddcf;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(20, 38, 28, 0.08);
  --shadow-md: 0 10px 30px rgba(20, 38, 28, 0.12);
  --shadow-lg: 0 24px 60px rgba(14, 27, 19, 0.22);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --maxw: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  color: var(--green-900);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.6rem, 3.1vw, 2.3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p { margin: 0 0 1.1em; }
a { color: var(--green-700); text-decoration-color: rgba(40, 80, 59, 0.35); text-underline-offset: 3px; }
a:hover { color: var(--green-600); }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: 0.45em; }
strong { color: var(--green-900); }
::selection { background: var(--gold); color: var(--green-950); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-900);
  color: var(--white);
  padding: 0.7rem 1.2rem;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: var(--white); }

.container {
  width: min(var(--maxw), 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 236, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--green-900);
}
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.01em;
}
.brand-name em { font-style: normal; color: var(--gold-dark); }
.brand-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.main-nav a:hover { background: var(--green-100); color: var(--green-800); }
.main-nav a[aria-current="page"] {
  background: var(--green-800);
  color: var(--white);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  color: var(--green-900);
  font: inherit;
  font-weight: 600;
}
.nav-toggle svg { display: block; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.5rem; }
  .main-nav {
    position: absolute;
    inset: 74px 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem 1.25rem 1.2rem;
    gap: 0.2rem;
  }
  .main-nav a { padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(135deg, var(--amber), var(--gold));
  color: var(--green-950);
  box-shadow: 0 8px 20px rgba(201, 154, 75, 0.35);
}
.btn-gold:hover { color: var(--green-950); box-shadow: 0 12px 26px rgba(201, 154, 75, 0.45); }
.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.btn-outline-dark {
  border-color: var(--green-700);
  color: var(--green-800);
}
.btn-outline-dark:hover { background: var(--green-800); color: var(--white); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(201, 154, 75, 0.22), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(74, 130, 100, 0.35), transparent 55%),
    linear-gradient(160deg, var(--green-900), var(--green-800) 55%, var(--green-950));
  color: var(--green-100);
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(4.5rem, 9vw, 7rem);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath d='M80 12 C60 40 52 78 80 148 C108 78 100 40 80 12 Z' fill='none' stroke='rgba(255,255,255,0.045)' stroke-width='1.4'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(217, 164, 65, 0.45);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  margin-bottom: 1.4rem;
}
.hero h1 { color: var(--white); max-width: 17ch; }
.hero h1 .accent { color: var(--amber); }
.hero-lead {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  max-width: 56ch;
  color: var(--green-200);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-figure {
  position: absolute;
  right: -4%;
  bottom: -6%;
  width: min(46vw, 560px);
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-paper { background: var(--paper); }
.section-tint { background: linear-gradient(180deg, var(--green-100), var(--cream)); }
.section-dark {
  background:
    radial-gradient(900px 420px at 90% 0%, rgba(201, 154, 75, 0.16), transparent 55%),
    linear-gradient(150deg, var(--green-900), var(--green-950));
  color: var(--green-100);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: var(--green-200); }

.section-head { max-width: 720px; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.8rem;
}
.section-dark .kicker { color: var(--amber); }
.lead { font-size: 1.13rem; color: var(--ink-soft); }
.section-dark .lead { color: var(--green-200); }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); margin-bottom: 0.8rem; }
.card .more-link { font-weight: 600; text-decoration: none; }
.card .more-link::after { content: " →"; }

.icon-badge {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--green-100), #eef4ec);
  border: 1px solid var(--line);
  margin-bottom: 1.1rem;
  color: var(--green-700);
}
.section-dark .icon-badge {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--amber);
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 1.4rem 1rem; border-radius: var(--radius); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700;
  color: var(--amber);
}
.stat-label { font-size: 0.92rem; color: var(--green-200); }

/* ---------- Split (image + text) ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split.reverse > .split-media { order: 2; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > .split-media { order: 0; }
}
.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  background: var(--green-800);
}
.split-media svg, .split-media img { display: block; width: 100%; height: auto; }

.checklist { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.7rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.32em;
  width: 1.15rem; height: 1.15rem;
  border-radius: 50%;
  background: var(--green-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 0.65rem;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- Timeline (process) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 25px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--green-500), var(--gold));
}
.timeline li { position: relative; padding: 0 0 2rem 4.4rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .step-no {
  position: absolute;
  left: 0; top: 0;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  background: var(--paper);
  border: 2px solid var(--gold);
  color: var(--green-800);
  box-shadow: var(--shadow-sm);
}
.timeline h3 { margin-bottom: 0.35rem; }
.timeline p { color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin: 1.6rem 0; }
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 0.97rem; }
caption { text-align: left; padding: 0.9rem 1.2rem; font-weight: 600; color: var(--green-800); background: var(--green-100); }
th, td { padding: 0.85rem 1.2rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--green-800); color: var(--white); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #faf8f1; }

/* ---------- Article / prose ---------- */
.article-hero {
  background:
    radial-gradient(800px 380px at 85% 0%, rgba(201, 154, 75, 0.18), transparent 60%),
    linear-gradient(160deg, var(--green-900), var(--green-800));
  color: var(--green-100);
  padding: clamp(2.8rem, 6vw, 4.6rem) 0;
}
.article-hero h1 { color: var(--white); max-width: 22ch; }
.article-hero .lead { color: var(--green-200); max-width: 62ch; margin-bottom: 0; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  font-size: 0.85rem;
}
.breadcrumb li { margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.breadcrumb li + li::before { content: "/"; color: rgba(255, 255, 255, 0.45); }
.breadcrumb a { color: var(--green-200); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb [aria-current] { color: var(--amber); }
.article-meta { font-size: 0.88rem; color: var(--green-200); margin-top: 1.1rem; }

.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose img, .prose figure { margin: 1.8rem 0; }
.prose blockquote {
  margin: 1.8rem 0;
  padding: 1.2rem 1.6rem;
  border-left: 4px solid var(--gold);
  background: var(--paper);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
  font-style: italic;
}
.prose .note {
  background: var(--green-100);
  border: 1px solid var(--green-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  font-size: 0.97rem;
  margin: 1.8rem 0;
}

/* ---------- Article cards ---------- */
.article-card { display: flex; flex-direction: column; }
.article-card .card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.6rem;
}
.article-card h3 { margin-bottom: 0.45rem; }
.article-card .more-link { margin-top: auto; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.4rem;
  margin-bottom: 0.9rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green-900);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--gold-dark);
  transition: transform 0.2s ease;
  flex: none;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0.8rem 0 0.2rem; color: var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(700px 300px at 15% 100%, rgba(217, 164, 65, 0.18), transparent 60%),
    linear-gradient(140deg, var(--green-800), var(--green-950));
  border-radius: var(--radius);
  color: var(--white);
  padding: clamp(2.2rem, 5vw, 3.6rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--green-200); max-width: 56ch; margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-950);
  color: var(--green-200);
  padding: 3.6rem 0 2rem;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.2rem;
  margin-bottom: 2.4rem;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2, .site-footer h3 {
  color: var(--white);
  font-size: 0.85rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--green-200); text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.footer-brand p { color: rgba(207, 224, 212, 0.75); max-width: 40ch; }
.footer-disclaimer {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  font-size: 0.86rem;
  color: rgba(207, 224, 212, 0.8);
  margin-bottom: 1.8rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.84rem;
  color: rgba(207, 224, 212, 0.6);
}

/* ---------- Cookie consent ---------- */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 300;
  background: rgba(14, 27, 19, 0.97);
  color: var(--green-100);
  padding: 1.1rem 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(110%);
  transition: transform 0.35s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: 0.92rem; flex: 1 1 420px; }
.cookie-inner a { color: var(--amber); }
.cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-actions .btn { padding: 0.6rem 1.3rem; font-size: 0.92rem; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.1rem; max-width: 640px; }
.form-row { display: grid; gap: 0.4rem; }
.form-row label { font-weight: 600; font-size: 0.95rem; color: var(--green-900); }
.form-row input, .form-row textarea, .form-row select {
  font: inherit;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
}
.form-row input:focus, .form-row textarea:focus {
  outline: 3px solid rgba(201, 154, 75, 0.4);
  border-color: var(--gold);
}
.form-hint { font-size: 0.86rem; color: var(--ink-soft); }

/* ---------- Utility / notices ---------- */
.notice-draft {
  background: #fdf6e3;
  border: 1px dashed var(--gold-dark);
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  font-size: 0.92rem;
  color: #6b5a2b;
  margin: 1.4rem 0;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1.4rem; }
.tag-list li { margin: 0; background: var(--green-100); border: 1px solid var(--green-200); border-radius: 999px; padding: 0.28rem 0.85rem; font-size: 0.85rem; color: var(--green-800); }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .cookie-banner, .hero-actions, .cta-band { display: none !important; }
  body { background: #fff; }
}
