/* =========================================================
   KRI guest sites - design tokens and component patterns

   Source: /root/src/kri-website/src/assets/style.css
           (KRI ry static site design system: slate + live KRI blue + paper)
   Read through its script-refreshed mirror in this repo,
   wp-content/mu-plugins/kri-booking-skin/assets/style.css (see refresh-css.sh).

   Values are copied from the source, not invented, and the source token
   and class names are kept. NOTE: the --amber-* tokens are BLUE. They are
   backwards-compatible aliases of --highlight-* (the KRI blue), not amber.
   This file does not load the Inter and Fraunces webfonts; the page does.
   The only section not lifted from the source is "Forms" at the end,
   which is marked DERIVED.
   ========================================================= */

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

:root {
  /* Brand palette - engineering navy + live KRI blue + paper */
  --slate-900: #0f1a2c;
  --slate-800: #18243a;
  --slate-700: #243349;
  --slate-500: #4d5a72;
  --slate-400: #6b7790;
  --slate-300: #9aa3b8;
  --slate-200: #c9cfdc;
  --slate-100: #e6e9f1;
  --paper:     #fbfaf6;
  --paper-2:   #f4f1e9;
  --line:      #e2decf;

  --highlight-700: #273aa8;
  --highlight-600: #3648d6;
  --highlight-500: #3452ff;
  --highlight-300: #8fa0ff;
  --highlight-100: #e9edff;

  /* Backwards-compatible alias: old amber classes render the KRI blue highlight. */
  --amber-700: var(--highlight-700);
  --amber-600: var(--highlight-600);
  --amber-500: var(--highlight-500);
  --amber-300: var(--highlight-300);
  --amber-100: var(--highlight-100);

  --teal-700:  #14605a;
  --teal-500:  #1d8a7f;

  /* Type */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Fraunces', 'Times New Roman', Georgia, serif;

  /* Fluid sizes */
  --t-xs:   clamp(0.72rem, 0.7rem + 0.2vw, 0.78rem);
  --t-sm:   clamp(0.85rem, 0.82rem + 0.2vw, 0.92rem);
  --t-base: clamp(0.98rem, 0.95rem + 0.25vw, 1.05rem);
  --t-lg:   clamp(1.12rem, 1.05rem + 0.6vw, 1.32rem);
  --t-xl:   clamp(1.45rem, 1.25rem + 1.2vw, 1.95rem);
  --t-2xl:  clamp(2.0rem,  1.65rem + 2.2vw, 3.0rem);
  --t-3xl:  clamp(2.6rem,  2.0rem + 3.5vw, 4.4rem);

  /* Spacing - full 4px scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 28px; --s-8: 32px; --s-9: 36px; --s-10: 40px; --s-12: 48px;
  --s-16: 64px; --s-20: 80px; --s-24: 96px; --s-32: 128px;

  /* Radii + shadows */
  --r-sm: 6px;  --r-md: 10px; --r-lg: 16px; --r-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15,26,44,.05), 0 2px 6px rgba(15,26,44,.04);
  --shadow-md: 0 4px 12px rgba(15,26,44,.07), 0 12px 30px rgba(15,26,44,.06);
  --shadow-lg: 0 12px 32px rgba(15,26,44,.10), 0 32px 80px rgba(15,26,44,.08);

  --ease: cubic-bezier(.2,.7,.2,1);

  /* Motion */
  --ease-enter:  cubic-bezier(.16,1,.3,1);  /* entrances/reveals (expo-out) */
  --dur-fast:    .15s;                       /* link/tab/color flips */
  --dur-base:    .25s;                       /* card hovers, button presses */
  --dur-slow:    .7s;                        /* scroll reveals */
  --dist-reveal: 24px;                       /* reveal-up travel distance */
  --stagger:     90ms;                       /* per-group stagger step */
}

/* ====================== Base ====================== */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--slate-800);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber-700); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--amber-600); }
/* Keyboard focus - instant by design, no animation */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--amber-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; line-height: 1.12; color: var(--slate-900); letter-spacing: -0.015em; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-lg); }
em { font-style: italic; color: var(--amber-700); }

/* ====================== Layout ====================== */
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.container-narrow { width: min(820px, calc(100% - 32px)); margin: 0 auto; }
.section { padding: var(--s-24) 0; }
.section-tight { padding: var(--s-16) 0; }

.eyebrow {
  display: inline-block;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-700);
  margin-bottom: var(--s-4);
}

.lead {
  font-size: var(--t-lg);
  line-height: 1.55;
  color: var(--slate-500);
  font-weight: 300;
}

.breadcrumbs {
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: var(--s-4);
  font-weight: 600;
}
.breadcrumbs a { color: var(--slate-500); }
.breadcrumbs a:hover { color: var(--slate-900); }

/* ====================== Header ====================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 246, 0.88);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* ====================== Buttons ====================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--slate-900); color: var(--paper); }
.btn-primary:hover { background: var(--slate-700); color: var(--paper); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-amber { background: var(--amber-600); color: white; }
.btn-amber:hover { background: var(--amber-700); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--slate-900); border-color: var(--slate-300); }
.btn-ghost:hover { border-color: var(--slate-900); color: var(--slate-900); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .12s; }

/* ====================== Cards ====================== */
.booking-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-5); }
.booking-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: var(--s-6);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.booking-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--amber-300); }
.booking-card-loc { font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-700); }
.booking-card strong { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 500; color: var(--slate-900); }
.booking-card-cta { display: inline-block; margin-top: 6px; color: var(--amber-700); font-weight: 700; font-size: .92rem; transition: transform .2s var(--ease); }
.booking-card:hover .booking-card-cta { transform: translateX(3px); }

.benefit {
  padding: var(--s-8);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  position: relative;
}
.benefit-num {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--amber-600);
  font-weight: 400;
  margin-bottom: var(--s-4);
  display: block;
}
.benefit h3 { font-size: var(--t-lg); margin-bottom: var(--s-3); }
.benefit p { color: var(--slate-500); font-size: var(--t-sm); }

.contact-card {
  padding: var(--s-6);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: left;
}
.contact-card-label {
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-700);
  font-weight: 700;
  margin-bottom: var(--s-2);
}
.contact-card-value {
  font-family: var(--font-serif);
  font-size: var(--t-lg);
  color: var(--slate-900);
  overflow-wrap: anywhere;
}
.contact-card-value a { color: inherit; }
.contact-card p { overflow-wrap: anywhere; }

.piiri-card {
  padding: var(--s-6);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.piiri-card:hover { transform: translateY(-2px); border-color: var(--amber-500); }
.piiri-card h3 { font-size: var(--t-base); color: var(--slate-900); }

.about-stat {
  padding: var(--s-4) var(--s-6);
  background: var(--paper-2);
  border-radius: var(--r-md);
  border-left: 3px solid var(--amber-500);
}
.about-stat-num { font-family: var(--font-serif); font-size: 1.6rem; color: var(--slate-900); }
.about-stat-label { font-size: var(--t-xs); color: var(--slate-500); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; overflow-wrap: anywhere; }

/* ====================== Tags ====================== */
.tag {
  display: inline-block;
  font-size: var(--t-xs);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--slate-700);
  border: 1px solid var(--line);
}
.tag-amber { background: var(--amber-100); color: var(--amber-700); border-color: var(--amber-300); }
.tag-teal { background: #e3f2f0; color: var(--teal-700); border-color: #c1ddd8; }

/* ====================== Tabs ====================== */
.pricing-tabs {
  display: flex;
  gap: var(--s-2);
  margin-bottom: var(--s-8);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.pricing-tab {
  padding: 12px 20px;
  font-size: var(--t-sm);
  font-weight: 600;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--slate-500);
  cursor: pointer;
  font-family: inherit;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.pricing-tab.active { color: var(--slate-900); border-bottom-color: var(--amber-500); }
.pricing-tab:hover { color: var(--slate-900); }
.pricing-panel { display: none; }
.pricing-panel.active { display: block; }

/* ====================== Accordion (FAQ) ====================== */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-6) 0;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: var(--t-lg);
  color: var(--slate-900);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 1.4rem;
  color: var(--amber-600);
  font-weight: 300;
  transition: transform .2s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body {
  padding: 0 0 var(--s-6);
  color: var(--slate-500);
  font-size: var(--t-base);
  line-height: 1.65;
}
.faq-item .faq-body p + p,
.faq-item .faq-body p + ul { margin-top: var(--s-3); }
.faq-item .faq-body ul { padding-left: 20px; }
.faq-item .faq-body li { margin-bottom: 4px; }

/* ====================== Notice block ====================== */
.notice {
  background: var(--amber-100);
  border: 1px solid var(--amber-300);
  border-left: 4px solid var(--amber-600);
  padding: var(--s-6) var(--s-8);
  border-radius: var(--r-md);
  color: var(--slate-800);
  margin-bottom: var(--s-8);
}
.notice strong { color: var(--amber-700); }
.notice ul { padding-left: 20px; margin-top: var(--s-2); }
.notice li { margin-bottom: 4px; }

/* ====================== Article prose (manual sections) ====================== */
.article-body {
  max-width: 720px; margin: 0 auto;
  padding: var(--s-16) 0 var(--s-12);
  font-size: 1.075rem; line-height: 1.74; color: var(--slate-800);
}
.article-body p { margin-bottom: 1.25em; }
.article-body h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 1.95rem);
  line-height: 1.2; letter-spacing: -0.01em;
  margin: 2.2em 0 0.6em;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: var(--t-xl); margin: var(--s-10) 0 var(--s-4); }
.article-body h4 { font-size: var(--t-lg); margin: var(--s-8) 0 var(--s-3); }
.article-body strong { color: var(--slate-900); }
.article-body a { font-weight: 600; border-bottom: 1px solid currentColor; }
/* Ordered steps: numbered blue badge markers. Markup carries NO manual numbers. */
.article-body ol {
  list-style: none;
  counter-reset: kri-step;
  padding: 0;
  margin: 1.4em 0 1.6em;
}
.article-body ol li {
  position: relative;
  counter-increment: kri-step;
  padding-left: 2.4em;
  margin-bottom: 0.85em;
  line-height: 1.7;
}
.article-body ol li::before {
  content: counter(kri-step);
  position: absolute; left: 0; top: 0.05em;
  display: flex; align-items: center; justify-content: center;
  width: 1.65em; height: 1.65em;
  font-family: var(--font-sans);
  font-size: 0.82em; font-weight: 700;
  color: var(--amber-700);
  background: var(--amber-100);
  border: 1px solid var(--amber-300);
  border-radius: 50%;
}
/* Prose bullets: clean hanging dots, no card chrome. */
.article-body ul {
  list-style: none;
  padding: 0;
  margin: 1.4em 0 1.6em;
}
.article-body ul li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.7em;
  line-height: 1.7;
  color: var(--slate-800);
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0.1em; top: 0.74em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber-500);
}
/* Highlight note (aside): brand-blue tint with a left accent. */
.article-callout {
  max-width: 720px; margin: var(--s-9) auto;
  padding: var(--s-6) var(--s-7);
  background: linear-gradient(180deg, var(--amber-100) 0%, var(--paper) 100%);
  border: 1px solid var(--amber-300);
  border-left: 4px solid var(--amber-500);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.26rem);
  line-height: 1.55;
  color: var(--slate-800);
}
.article-callout p { margin: 0 0 0.6em; }
.article-callout p:last-child { margin-bottom: 0; }
.article-didyouknow {
  max-width: 720px; margin: var(--s-10) auto;
  padding: var(--s-7) var(--s-8);
  background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.article-didyouknow .label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--amber-700);
  margin-bottom: var(--s-2);
}
.article-didyouknow h3 { font-family: var(--font-serif); font-size: var(--t-xl); margin: 0 0 var(--s-3); color: var(--slate-900); }
.article-didyouknow p { margin: 0; font-size: 1.02rem; line-height: 1.7; color: var(--slate-700); }

/* ====================== Locked panel (source: .members-only) ====================== */
.members-only {
  max-width: 720px; margin: var(--s-12) auto;
  padding: var(--s-10) var(--s-8);
  background: linear-gradient(160deg, var(--slate-900) 0%, var(--slate-700) 100%);
  color: var(--paper);
  border-radius: var(--r-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.members-only::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 40% at 50% 0%, rgba(52,82,255,.30), transparent 65%);
  pointer-events: none;
}
.members-only > * { position: relative; z-index: 1; }
.members-only .lock {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(52,82,255,.18); border: 1px solid rgba(52,82,255,.4);
  color: var(--amber-300); font-size: 24px;
  margin-bottom: var(--s-4);
}
.members-only .label {
  font-size: 11.5px; letter-spacing: 0.24em; text-transform: uppercase;
  font-weight: 700; color: var(--amber-300); margin-bottom: var(--s-3);
}
.members-only h2 {
  color: var(--paper); font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.2rem);
  max-width: 24ch; margin: 0 auto var(--s-4);
}
.members-only h2 em { color: var(--amber-300); }
.members-only p { color: var(--slate-200); max-width: 48ch; margin: 0 auto var(--s-6); font-size: 1.02rem; line-height: 1.55; }
.members-only .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.members-only .btn-ghost { color: var(--paper); border-color: rgba(255,255,255,.3); }
.members-only .btn-ghost:hover { border-color: var(--paper); color: var(--paper); background: rgba(255,255,255,.06); }

/* ====================== Motion ======================
   JS adds the reveal classes, so no-JS and reduced-motion users always
   see final states. */
@media (prefers-reduced-motion: no-preference) {
  .reveal, .reveal-up {
    opacity: 0;
    transform: translateY(var(--dist-reveal));
    transition: opacity var(--dur-slow) var(--ease-enter), transform var(--dur-slow) var(--ease-enter);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal-fade {
    opacity: 0;
    transition: opacity .6s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal.is-visible, .reveal-up.is-visible, .reveal-fade.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq-item summary::after { transition: none; }
}

/* ====================== Responsive ====================== */
@media (max-width: 640px) {
  .section { padding: var(--s-16) 0; }
}

/* ====================== Forms (DERIVED, not in the source) ======================
   The source stylesheet has no form-field rules. These are composed only
   from source tokens: the .btn-ghost border, the white card surface, the
   .btn radius and the source focus ring. The one new value is the 16px
   floor on field text: --t-base bottoms out at 0.98rem, which is under
   the 16px that stops iOS from zooming into a focused field. Review in
   the hi-fi phase. */
.field { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); }
.field label { font-size: var(--t-sm); font-weight: 600; color: var(--slate-900); }
.field-hint { font-size: var(--t-sm); color: var(--slate-500); }
.input, .select, .textarea {
  width: 100%;
  padding: 14px var(--s-4);
  background: white;
  color: var(--slate-800);
  border: 1px solid var(--slate-300);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: max(16px, var(--t-base));
  line-height: 1.6;
  transition: border-color .15s var(--ease);
}
.textarea { min-height: var(--s-32); resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--slate-900); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 2px solid var(--amber-500);
  outline-offset: 3px;
}
