/* ==========================================================================
   IKIGAI PARTNERS — SITE STYLESHEET
   ==========================================================================
   HOW TO EDIT THIS FILE
   Every knob you are likely to touch lives in the CONTROL PANEL below.
   Change a value there and it updates across the whole site.
   ========================================================================== */

:root {

  /* ------------------------------------------------------------------
     1. BRAND COLORS
     ------------------------------------------------------------------ */
  --color-paper:        #fbf8f2;   /* page background */
  --color-surface:      #ffffff;   /* cards and panels */
  --color-ink:          #1a1a1a;   /* main text — near-black */
  --color-ink-deep:     #111111;   /* headlines */
  --color-muted:        #333333;   /* secondary text */
  --color-faint:        #555555;   /* labels, captions */
  --color-pine:         #2c4a3f;   /* primary buttons, CTA band */
  --color-ocean:        #2a5d7c;   /* links, nav, accents */
  --color-gold:         #d8b25c;   /* signature accent rule */
  --color-clay:         #c76b4a;   /* reserved (eyebrows removed) */
  --color-line:         rgba(45, 58, 64, 0.12);
  --color-tile:         #f6f2e9;

  /* ------------------------------------------------------------------
     2. TYPOGRAPHY
     ------------------------------------------------------------------ */
  --font-display:       "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:          "Inter", "Helvetica Neue", Arial, sans-serif;

  --size-h1:            clamp(34px, 5vw, 54px);
  --size-h2:            clamp(24px, 3vw, 32px);
  --size-h3:            clamp(20px, 2.4vw, 26px);
  --size-body:          17px;
  --size-lead:          clamp(17px, 2.2vw, 20px);
  --size-small:         14px;
  --size-eyebrow:       12px;

  --weight-body:        400;
  --weight-bold:        700;

  --leading-body:       1.65;
  --tracking-eyebrow:   0.16em;

  /* ------------------------------------------------------------------
     3. NAVIGATION BAR
     ------------------------------------------------------------------ */
  --nav-height:         60px;
  --nav-logo-height:    28px;
  --nav-font-size:      11px;
  --nav-tracking:       0.07em;
  --nav-gap:            16px;
  --nav-color:          #2a5d7c;
  --nav-bg:             rgba(251, 248, 242, 0.95);
  --nav-blur:           8px;

  /* ------------------------------------------------------------------
     4. PAGE LAYOUT & SECTION SPACING
     ------------------------------------------------------------------ */
  --page-max-width:     1100px;
  --page-side-pad:      clamp(18px, 4vw, 32px);

  --space-hero-top:     clamp(44px, 7vw, 80px);
  --space-hero-bottom:  clamp(24px, 4vw, 40px);
  --space-section:      clamp(20px, 3vw, 32px);
  --space-card-pad:     clamp(20px, 3.2vw, 32px);
  --space-footer-top:   clamp(36px, 6vw, 64px);

  /* ------------------------------------------------------------------
     5. HERO STATS ROW
     ------------------------------------------------------------------ */
  --stats-rule-color:   var(--color-gold);
  --stats-rule-height:  2px;
  --stats-number-size:  clamp(22px, 3vw, 28px);
  --stats-label-size:   13px;       /* increased from 11px for readability */
  --stats-gap:          clamp(20px, 4vw, 48px);

  /* ------------------------------------------------------------------
     6. BUTTONS & CTA BAND
     ------------------------------------------------------------------ */
  --button-pad-y:       10px;
  --button-pad-x:       20px;
  --button-radius:      999px;
  --button-font-size:   14px;

  --cta-max-width:      100%;
  --cta-pad-y:          clamp(20px, 3vw, 28px);
  --cta-pad-x:          clamp(20px, 3vw, 30px);
  --cta-radius:         14px;
  --cta-bg:             linear-gradient(135deg, var(--color-pine), #28534a);
  --cta-heading-size:   clamp(19px, 2.6vw, 24px);

  /* ------------------------------------------------------------------
     7. CARDS, TILES & TABLES
     ------------------------------------------------------------------ */
  --card-radius:        14px;
  --card-border:        1px solid var(--color-line);
  --card-shadow:        0 8px 26px rgba(45, 58, 64, 0.07);
  --tile-radius:        10px;
  --tile-pad:           18px 14px;

  /* ------------------------------------------------------------------
     8. SEARCH
     ------------------------------------------------------------------ */
  --search-width:       560px;
  --search-input-size:  17px;
  --search-result-size: 15px;

  /* ------------------------------------------------------------------
     9. MOTION
     ------------------------------------------------------------------ */
  --scroll-duration:    700;       /* ms — higher = slower */
  --hover-speed:        160ms;
  --anchor-offset:      74px;

  /* ------------------------------------------------------------------
     10. FOOTER
     ------------------------------------------------------------------ */
  --footer-bg:          #232f35;
  --footer-text:        #aeb9bf;
  --footer-heading:     #f0ece3;
  --footer-pad-y:       clamp(32px, 5vw, 48px);
}

/* ==========================================================================
   BASE
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-padding-top: var(--anchor-offset); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--color-ocean); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid rgba(42, 93, 124, 0.5);
  outline-offset: 3px;
}
.wrap {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding-left: var(--page-side-pad);
  padding-right: var(--page-side-pad);
}
[id] { scroll-margin-top: var(--anchor-offset); }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-pine); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ==========================================================================
   HEADER & NAV
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(var(--nav-blur));
  backdrop-filter: blur(var(--nav-blur));
  border-bottom: 1px solid var(--color-line);
}
.site-header .wrap {
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-width: 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { height: var(--nav-logo-height); width: auto; display: block; }
.brand span {
  font-size: 12px; letter-spacing: 0.2em; font-weight: 700;
  color: var(--color-ink); white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: var(--nav-gap); flex-wrap: nowrap; min-width: 0; }
.site-nav a {
  font-size: var(--nav-font-size); letter-spacing: var(--nav-tracking);
  text-transform: uppercase; text-decoration: none; color: var(--nav-color);
  font-weight: 700; border-bottom: 1px solid transparent; padding: 4px 0;
  white-space: nowrap;
}
.site-nav a:hover { border-bottom-color: var(--nav-color); }
/* Separator before Insights/FAQ */
.site-nav .nav-sep {
  width: 1px; height: 14px; background: var(--color-line);
  flex-shrink: 0; pointer-events: none;
}
.site-nav a.nav-cta {
  background: var(--color-pine); color: var(--color-paper);
  padding: 8px 14px; border-radius: var(--button-radius); border: 0;
}
.site-nav a.nav-cta:hover { background: #234035; border-bottom-color: transparent; }
.icon-btn {
  background: none; border: 0; cursor: pointer; color: var(--color-ink);
  padding: 8px; display: inline-flex; align-items: center; flex-shrink: 0;
}
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }

/* Mobile nav */
@media (max-width: 1080px) {
  .site-nav {
    position: fixed; inset: var(--nav-height) 0 auto 0;
    display: none; flex-direction: row; flex-wrap: wrap;
    align-items: start;
    background: var(--color-paper); border-bottom: 1px solid var(--color-line);
    padding: 12px var(--page-side-pad) 20px;
    box-shadow: 0 18px 30px rgba(34, 46, 51, 0.12);
    /* Two-column grid on mobile */
    display: none; grid-template-columns: 1fr 1fr; gap: 0;
  }
  .site-nav.open { display: grid; }
  .site-nav .nav-sep { display: none; }
  .site-nav a {
    padding: 11px 8px; font-size: 12px; display: block;
    border-bottom: 1px solid var(--color-line); width: 100%;
  }
  .site-nav a.nav-cta {
    grid-column: 1 / -1; text-align: center;
    margin-top: 10px; border-radius: var(--button-radius);
    border-bottom: none;
  }
  .menu-btn { display: inline-flex; }
}

/* ==========================================================================
   SEARCH OVERLAY
   ========================================================================== */
.search-panel {
  position: fixed; inset: 0; z-index: 80; display: none;
  background: rgba(34, 46, 51, 0.45);
  padding: clamp(60px, 12vh, 120px) var(--page-side-pad) 24px;
}
.search-panel.open { display: block; }
.search-box {
  max-width: var(--search-width); margin: 0 auto;
  background: var(--color-surface); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.search-box input {
  width: 100%; border: 0; padding: 18px 20px;
  font: 400 var(--search-input-size) var(--font-body); color: var(--color-ink);
  border-bottom: 1px solid var(--color-line); background: var(--color-surface);
}
.search-box input:focus { outline: none; }
.search-results { max-height: 50vh; overflow-y: auto; }
.search-results a {
  display: block; padding: 13px 20px; text-decoration: none;
  border-bottom: 1px solid var(--color-line);
}
.search-results a:hover, .search-results a.active { background: var(--color-tile); }
.search-results .r-title {
  font-size: var(--search-result-size); font-weight: 700; color: var(--color-ink-deep);
}
.search-results .r-page { font-size: 12px; color: var(--color-faint); margin-top: 2px; }
.search-empty { padding: 16px 20px; font-size: 14px; color: var(--color-faint); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { padding-top: var(--space-hero-top); padding-bottom: var(--space-hero-bottom); }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--size-h1); line-height: 1.1; letter-spacing: -0.5px;
  color: var(--color-ink-deep); margin: 0 0 20px;
  /* No max-width — runs full column width */
}
.hero .lead {
  font-size: var(--size-lead); color: var(--color-ink);
  font-weight: 400; margin: 0 0 14px;
  /* No max-width — matches full column width */
}

/* Stats row */
.stats {
  display: flex; flex-wrap: wrap; gap: 16px var(--stats-gap);
  border-top: var(--stats-rule-height) solid var(--stats-rule-color);
  padding-top: 20px; margin: 28px 0 0;
}
.stat { min-width: 100px; }
.stat .n {
  font-size: var(--stats-number-size); font-weight: 700;
  color: var(--color-ink-deep); letter-spacing: -0.3px; line-height: 1.1;
}
.stat .l {
  font-size: var(--stats-label-size); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-ink); margin-top: 6px; /* black, not grey */
}

/* ==========================================================================
   SECTIONS & CARDS
   ========================================================================== */
.section { margin-bottom: var(--space-section); }
.card {
  background: var(--color-surface); border: var(--card-border);
  border-radius: var(--card-radius); padding: var(--space-card-pad);
  box-shadow: var(--card-shadow);
}
/* Eyebrows removed — class kept in CSS so HTML still works if re-added */
.eyebrow { display: none; }

.card h2, .section h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--size-h2); color: var(--color-ink-deep);
  margin: 0 0 16px; letter-spacing: -0.3px;
}
.card p { margin: 0 0 14px; }
.card p:last-child { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-section); }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* Fact tiles */
.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin-top: 18px;
}
@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; max-width: 100%; margin-left: auto; margin-right: auto; }
}
.fact {
  background: var(--color-tile); border-radius: var(--tile-radius);
  padding: var(--tile-pad);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  min-height: 90px;
}
.fact strong {
  display: block; font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-ocean); margin-bottom: 7px;
}
.fact span {
  font-weight: 700; color: var(--color-ink-deep); font-size: 15px;
  line-height: 1.3;
  /* Prevent 3-line wrap — allow natural 2-line max */
  display: -webkit-box; -webkit-box-orient: vertical;
  overflow: hidden; -webkit-line-clamp: 2;
}
.footnote {
  margin-top: 12px; font-size: var(--size-small); color: var(--color-muted);
}

/* Lists */
.card ul, .card ol { margin: 0; padding-left: 1.4em; }
.card li { margin-bottom: 8px; font-weight: 400; }
.card li:last-child { margin-bottom: 0; }
.card li::marker { color: var(--color-gold); }
.card ol li::marker { color: var(--color-clay); font-weight: 700; }
/* Prevent bullet text from wrapping to second line where possible */
.card ul li, .card ol li { white-space: normal; }

/* ==========================================================================
   CTA BAND
   ========================================================================== */
.cta {
  max-width: var(--cta-max-width);
  background: var(--cta-bg); color: #fff; border-radius: var(--cta-radius);
  padding: var(--cta-pad-y) var(--cta-pad-x);
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
}
.cta strong {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--cta-heading-size); display: block; margin-bottom: 4px;
}
.cta p { margin: 0; color: rgba(251, 248, 242, 0.85); font-size: 16px; }
.button {
  display: inline-block; background: var(--color-paper); color: var(--color-pine);
  text-decoration: none; font-weight: 700; font-size: var(--button-font-size);
  padding: var(--button-pad-y) var(--button-pad-x);
  border-radius: var(--button-radius); white-space: nowrap;
  transition: transform var(--hover-speed) ease, background var(--hover-speed) ease;
}
.button:hover { transform: translateY(-1px); background: #fff; }

/* ==========================================================================
   ARTICLE & INSIGHTS
   ========================================================================== */
/* Article matches homepage width — no narrow max-width */
.article { max-width: var(--page-max-width); }
.article .hero { padding-bottom: 0; }
.article h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--size-h3); color: var(--color-pine); margin: 40px 0 14px;
}
.article p { margin: 0 0 16px; }
.article figure { margin: 28px auto; max-width: 640px; }
.article figure img {
  display: block; width: 100%;
  border-radius: 12px; border: 1px solid var(--color-line);
  background: #fff; padding: 6px;
}
.article figcaption {
  margin-top: 8px; font-size: var(--size-small); color: var(--color-faint);
  text-align: center;
}
.loop {
  font-weight: 700; font-size: 18px; margin: 20px 0; color: var(--color-ink-deep);
}
.loop.pop {
  padding: 16px 18px; border-radius: 12px;
  background: rgba(216, 178, 92, 0.15);
  border: 1px solid rgba(216, 178, 92, 0.5);
}
blockquote {
  margin: 18px 0 22px; padding: 16px 20px;
  border-left: 5px solid var(--color-gold);
  background: var(--color-tile); border-radius: 0 10px 10px 0;
  font-size: 16px; font-style: italic;
}
.table-wrap {
  overflow-x: auto; border: 1px solid var(--color-line);
  border-radius: 12px; background: #fff; margin: 24px 0;
}
table { width: 100%; border-collapse: collapse; min-width: 540px; }
th, td {
  padding: 14px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--color-line); font-size: 15px;
  width: 33.33%;
}
th {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-ocean);
  background: rgba(42, 93, 124, 0.05);
}
th .th-sub {
  display: block; margin-top: 4px; font-size: 12px; font-weight: 400;
  text-transform: none; letter-spacing: 0.02em; color: rgba(42, 93, 124, 0.75);
}
/* Mobile table: stacked cards — always visible */
@media (max-width: 700px) {
  .table-wrap { overflow-x: visible; border: 0; background: none; border-radius: 0; }
  table, thead, tbody, tr, th, td { display: block; width: 100% !important; min-width: 0; }
  thead { display: none; }
  tbody tr { margin-bottom: 20px; border: var(--card-border); border-radius: var(--card-radius); overflow: hidden; box-shadow: var(--card-shadow); }
  td {
    border: 0; border-bottom: 1px solid var(--color-line);
    padding: 14px 16px; background: var(--color-surface);
  }
  td:last-child { border-bottom: 0; }
  td::before {
    content: attr(data-label); display: block; font-size: 11px;
    letter-spacing: 0.13em; text-transform: uppercase;
    color: var(--color-ocean); font-weight: 700;
    margin-bottom: 5px;
  }
}
.footnotes { font-size: var(--size-small); color: var(--color-muted); margin-top: 8px; }
.footnotes ol { padding-left: 1.4em; }
.footnotes li { margin: 10px 0; overflow-wrap: anywhere; }
.footnotes a { color: var(--color-ocean); }
.article hr { border: 0; border-top: 1px solid var(--color-line); margin: 36px 0 20px; }

/* Insights listing */
.insights-hero { padding-bottom: 12px; } /* reduced gap before card */
.insight-card {
  display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr);
  gap: clamp(18px, 3.5vw, 32px); align-items: center;
  background: var(--color-surface); border: var(--card-border);
  border-radius: var(--card-radius); padding: var(--space-card-pad);
  text-decoration: none; color: inherit; box-shadow: var(--card-shadow);
  transition: transform var(--hover-speed) ease, box-shadow var(--hover-speed) ease;
}
.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(45, 58, 64, 0.12);
}
.insight-card img { border-radius: 10px; border: 1px solid var(--color-line); display: block; }
.insight-card h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(22px, 3.4vw, 32px); margin: 0 0 10px; color: var(--color-ink-deep);
  letter-spacing: -0.2px;
}
.insight-card p { margin: 0; color: var(--color-muted); }
.meta {
  margin-top: 12px; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--color-pine); font-weight: 700;
}
@media (max-width: 720px) { .insight-card { grid-template-columns: 1fr; } }

/* ==========================================================================
   FAQ  (accordion)
   ========================================================================== */
.faq-list { max-width: var(--page-max-width); }
.faq-item {
  background: var(--color-surface); border: var(--card-border);
  border-radius: var(--card-radius); margin-bottom: 12px;
  box-shadow: var(--card-shadow);
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px var(--space-card-pad);
  font-weight: 700; font-size: 17px; color: var(--color-ink-deep);
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  text-align: left;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 22px; color: var(--color-gold);
  font-weight: 400; line-height: 1; flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a {
  padding: 0 var(--space-card-pad) 20px; color: var(--color-ink);
  text-align: left; font-size: inherit; line-height: var(--leading-body);
}
.faq-item .faq-a p { margin: 0 0 14px; font-size: inherit; line-height: inherit; }
.faq-item .faq-a p:last-child { margin-bottom: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: var(--space-footer-top);
  background: var(--footer-bg); color: var(--footer-text);
  padding: var(--footer-pad-y) 0;
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 24px 48px;
  justify-content: space-between; align-items: flex-start;
}
.site-footer .f-brand {
  font-family: var(--font-display); font-size: 20px;
  color: var(--footer-heading); font-weight: 700;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer a { color: var(--footer-text); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .f-legal { font-size: 13px; color: #7d8a91; width: 100%; margin-top: 8px; }

/* ==========================================================================
   404
   ========================================================================== */
.page-404 { text-align: center; padding: clamp(60px, 12vh, 140px) 0; }
.page-404 h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--size-h1); color: var(--color-ink-deep); margin: 0 0 12px; }
.page-404 p { color: var(--color-muted); margin: 0 0 24px; }
.page-404 .button { background: var(--color-pine); color: #fff; }

/* ==========================================================================
   MOTION PREFERENCES
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* FAQ hero: tighter gap before first question */
.faq-hero { padding-bottom: 6px; }
.faq-list .faq-item:first-of-type { margin-top: 0; }

/* Article breadcrumb (eyebrow class is hidden site-wide, so use .crumb) */
.crumb {
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-ink); margin: 0 0 10px;
}

@media (max-width: 640px) {
  .card { padding: 18px 14px; }
  .card ul, .card ol { padding-left: 1.1em; }
  .stats {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 16px; row-gap: 24px;
  }
  .stat { min-width: 0; }
  .stat:nth-child(even) { text-align: right; }
}
