/* ==========================================================================
   Aiman’s Archive — style.css
   One stylesheet for the whole site. Mobile-first.
   EDIT COLOURS: change the design tokens in :root (light) and the two
   dark-mode blocks below. Everything else reads from these variables.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand palette */
  --navy: #17243A;
  --navy-soft: #24344F;
  --cream: #F7F4ED;
  --sage: #D7E5DC;
  --sage-deep: #A9C4B3;
  --accent: #E9B88D;
  --accent-deep: #9A5B26; /* darker accent for text on light backgrounds (AA) */
  --white: #FFFFFF;

  /* Semantic colours (light mode) */
  --bg: var(--cream);
  --surface: var(--white);
  --surface-alt: var(--sage);
  --text: var(--navy);
  --text-muted: #4A5568;
  --border: #E4DED1;
  --link: var(--navy);
  --focus: #1F6FEB;
  --note-bg: #FFF4D6;
  --note-text: var(--navy);
  --shadow: 0 1px 2px rgba(23, 36, 58, 0.05), 0 8px 24px rgba(23, 36, 58, 0.06);
  --shadow-hover: 0 2px 4px rgba(23, 36, 58, 0.06), 0 14px 32px rgba(23, 36, 58, 0.1);

  /* Typography */
  --font-heading: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Segoe Print", "Bradley Hand", "Chalkboard SE", "Comic Neue", "Marker Felt", cursive;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-2xl: clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem);
  --fs-3xl: clamp(2.1rem, 1.5rem + 3vw, 3.5rem);

  /* Spacing, radius, layout */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --container: 1160px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* Dark mode: follows the system unless the visitor picks light/dark with the toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1828;
    --surface: #17243A;
    --surface-alt: #1E3A34;
    --text: #F7F4ED;
    --text-muted: #C3CAD6;
    --border: #2C3D59;
    --link: #F7F4ED;
    --accent-deep: #E9B88D;
    --focus: #7FB2FF;
    --note-bg: #3A3222;
    --note-text: #F7F4ED;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 14px 32px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1828;
  --surface: #17243A;
  --surface-alt: #1E3A34;
  --text: #F7F4ED;
  --text-muted: #C3CAD6;
  --border: #2C3D59;
  --link: #F7F4ED;
  --accent-deep: #E9B88D;
  --focus: #7FB2FF;
  --note-bg: #3A3222;
  --note-text: #F7F4ED;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 14px 32px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
p { text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-3); }

/* ---------- 3. Layout helpers ---------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
.section { padding-block: var(--space-8); }
.section-tight { padding-block: var(--space-7); }
.section-head { max-width: 40rem; margin-bottom: var(--space-6); }
.section-head h2 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.section-head p { color: var(--text-muted); font-size: var(--fs-lg); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: var(--space-3);
}

.lede { font-size: var(--fs-lg); color: var(--text-muted); max-width: 36rem; }

/* Handwritten margin note */
.hand-note {
  font-family: var(--font-hand);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transform: rotate(-2deg);
}
.hand-note svg { flex: none; }

/* ---------- 4. Buttons & chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  line-height: 1.2;
  transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-soft); box-shadow: var(--shadow-hover); }
.btn-accent { background: var(--accent); color: var(--navy); }
.btn-accent:hover { box-shadow: var(--shadow-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: currentColor; }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { min-height: 42px; padding: 0.5rem 1.1rem; }

:root[data-theme="dark"] .btn-primary { background: var(--accent); color: var(--navy); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { background: var(--accent); color: var(--navy); }
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
:root[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--navy); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--navy); }
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--space-4);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo-mark { width: 34px; height: 34px; }

.menu-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle-bar {
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.nav-list { display: flex; gap: var(--space-1); list-style: none; padding: 0; }
.nav-list a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--fs-sm);
}
.nav-list a:hover { background: var(--surface-alt); }

/* Current page highlight (works with and without JS) */
[data-page="home"] .nav-list [data-nav="home"],
[data-page="ai-tools"] .nav-list [data-nav="ai-tools"],
[data-page="tool"] .nav-list [data-nav="ai-tools"],
.nav-list a[aria-current="page"] {
  background: var(--sage);
  color: var(--navy);
  font-weight: 600;
}

.nav-actions { display: flex; align-items: center; gap: var(--space-2); }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Mobile menu: only collapses when JS is running, so the nav is never lost */
@media (max-width: 859px) {
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    padding: var(--space-5) 1.25rem var(--space-6);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .js .site-nav.is-open { display: flex; }
  .js .nav-list { flex-direction: column; }
  .js .nav-list a { display: block; padding: 0.8rem 1rem; font-size: var(--fs-base); }
  .js .nav-actions { justify-content: space-between; }
  .js .nav-actions .btn { flex: 1; }
  .site-header .header-inner { flex-wrap: wrap; }
}

/* ---------- 6. Cards (shared) ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-5);
}
.card-link { transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.grid { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--sage);
  color: var(--navy);
  margin-bottom: var(--space-4);
}
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile.is-accent { background: var(--accent); }

/* ---------- 7. Home: hero ---------- */
.hero { padding-block: var(--space-7) var(--space-8); }
.hero-grid { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.hero h1 { font-size: var(--fs-3xl); font-weight: 700; margin-bottom: var(--space-5); }
.hero h1 .underline {
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 70%, transparent) 62%);
  padding-inline: 0.1em;
}
.hero .lede { margin-bottom: var(--space-6); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero .hand-note { margin-top: var(--space-5); }
.hero-art {
  position: relative;
  background: var(--sage);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow);
}
.hero-art svg { width: 100%; }

/* ---------- 8. Home: about ---------- */
.about-grid { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 0.85fr 1.15fr; } }
.photo-frame {
  position: relative;
  max-width: 380px;
  margin-inline: auto;
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}
.photo-frame img { border-radius: calc(var(--radius-lg) - 8px); width: 100%; }
.photo-frame figcaption {
  font-family: var(--font-hand);
  text-align: center;
  padding-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.photo-frame .tape {
  position: absolute;
  top: -12px; left: 50%;
  width: 96px; height: 26px;
  transform: translateX(-50%) rotate(3deg);
  background: color-mix(in srgb, var(--accent) 65%, transparent);
  border-radius: 3px;
}
.about-copy h2 { font-size: var(--fs-2xl); margin-bottom: var(--space-4); }
.about-copy p { font-size: var(--fs-lg); color: var(--text-muted); margin-bottom: var(--space-5); }
.label-list { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; padding: 0; }
.label-list li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
}
.label-list svg { width: 18px; height: 18px; color: var(--accent-deep); }

/* ---------- 9. Home: philosophy ---------- */
.philosophy-card {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 1.2rem + 4vw, 4rem);
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .philosophy-card { background: #1C2C47; border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .philosophy-card { background: #1C2C47; border: 1px solid var(--border); }
}
.philosophy-card .eyebrow { color: var(--accent); }
.philosophy-card blockquote { max-width: 48rem; margin-bottom: var(--space-7); }
.philosophy-card blockquote p {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: 600;
  line-height: 1.3;
}
.philosophy-card blockquote p::before { content: "“"; color: var(--accent); }
.philosophy-card blockquote p::after { content: "”"; color: var(--accent); }
.philosophy-card cite {
  display: block;
  margin-top: var(--space-4);
  font-style: normal;
  font-family: var(--font-hand);
  color: var(--sage);
}
.philosophy-doodle {
  position: absolute;
  right: -10px; top: -10px;
  width: 160px;
  opacity: 0.18;
  pointer-events: none;
}
.truths { display: grid; gap: var(--space-4); list-style: none; padding: 0; }
@media (min-width: 640px) { .truths { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .truths { grid-template-columns: repeat(4, 1fr); } }
.truths li {
  padding: var(--space-5);
  border-radius: var(--radius);
  background: rgba(247, 244, 237, 0.06);
  border: 1px solid rgba(247, 244, 237, 0.14);
}
.truths h3 {
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}
.truths p { color: #E3E7EE; font-size: var(--fs-sm); }

/* ---------- 10. Home: explore & articles ---------- */
.explore-card { display: flex; flex-direction: column; height: 100%; }
.explore-card h3 { font-size: var(--fs-xl); margin-bottom: var(--space-2); }
.explore-card p { color: var(--text-muted); margin-bottom: var(--space-5); flex: 1; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  color: var(--text);
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }
.text-link .arrow { transition: transform 0.2s var(--ease); }
.text-link:hover .arrow { transform: translateX(3px); }
.soon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-hand);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.article-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.article-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--border); }
.article-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.article-body h3 { font-size: var(--fs-lg); }
.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ---------- 11. Page hero (AI tools) ---------- */
.page-hero { padding-block: var(--space-7); }
.page-hero-grid { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 860px) { .page-hero-grid { grid-template-columns: 1.3fr 0.9fr; } }
.page-hero h1 { font-size: var(--fs-3xl); font-weight: 700; margin-bottom: var(--space-4); }
.page-hero-art { max-width: 360px; margin-inline: auto; width: 100%; }

/* ---------- 12. Tool directory ---------- */
.toolbar {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}
.search-field { position: relative; }
.search-field svg {
  position: absolute;
  left: 1rem; top: 50%;
  width: 20px; height: 20px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem 0.75rem 2.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: var(--fs-base);
}
.search-field input::placeholder { color: var(--text-muted); opacity: 1; }
.search-field input:focus-visible { outline-offset: 2px; }
.filter-group { border: 0; padding: 0; min-width: 0; }
.filter-group legend { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); margin-bottom: var(--space-2); text-transform: uppercase; letter-spacing: 0.1em; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; }
.results-count { font-size: var(--fs-sm); color: var(--text-muted); }

.tool-card { display: flex; flex-direction: column; gap: var(--space-3); height: 100%; }
.tool-card-head { display: flex; align-items: center; gap: var(--space-4); }
.tool-card h2, .tool-card h3 { font-size: var(--fs-lg); }
.tool-card p { color: var(--text-muted); flex: 1; font-size: var(--fs-sm); }
.tool-card .btn { align-self: flex-start; }

.logo-tile {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--tile, var(--sage));
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  border: 1px solid rgba(23, 36, 58, 0.08);
}
.logo-tile.is-large { width: 88px; height: 88px; border-radius: 24px; font-size: 1.8rem; }

.no-results {
  text-align: center;
  padding: var(--space-7) var(--space-5);
  max-width: 34rem;
  margin-inline: auto;
}
.no-results svg { width: 120px; margin: 0 auto var(--space-4); }
.no-results h2 { font-size: var(--fs-xl); margin-bottom: var(--space-2); }
.no-results p { color: var(--text-muted); margin-bottom: var(--space-5); }

/* ---------- 13. Tool detail ---------- */
.breadcrumbs { padding-top: var(--space-5); font-size: var(--fs-sm); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; color: var(--text-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--space-2); }
.breadcrumbs li + li::before { content: "→"; color: var(--text-muted); }
.breadcrumbs a { color: var(--text); }
.breadcrumbs [aria-current="page"] { font-weight: 600; color: var(--text); }

.identity-card {
  display: grid;
  gap: var(--space-5);
  align-items: center;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  margin-top: var(--space-5);
}
@media (min-width: 760px) { .identity-card { grid-template-columns: auto 1fr auto; } }
.identity-card h1 { font-size: var(--fs-3xl); font-weight: 700; }
.identity-card .descriptor { color: var(--text-muted); font-size: var(--fs-lg); margin-top: var(--space-1); }
.identity-card .tag { margin-top: var(--space-3); }

.detail-layout { display: grid; gap: var(--space-5); margin-top: var(--space-6); }
.detail-section h2 { font-size: var(--fs-xl); margin-bottom: var(--space-4); display: flex; align-items: center; gap: var(--space-3); }
.detail-section h2 .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--sage); color: var(--navy); font-size: var(--fs-sm);
}
.detail-section > p { color: var(--text-muted); font-size: var(--fs-lg); max-width: 48rem; }

.specialty-grid { display: grid; gap: var(--space-3); list-style: none; padding: 0; }
@media (min-width: 560px) { .specialty-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .specialty-grid { grid-template-columns: repeat(3, 1fr); } }
.specialty-grid li {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: var(--fs-sm);
}
.specialty-grid svg { width: 22px; height: 22px; flex: none; color: var(--accent-deep); }

.take-card { position: relative; background: var(--note-bg); color: var(--note-text); border-color: transparent; transform: rotate(-0.6deg); }
.take-card p { font-family: var(--font-hand); font-size: var(--fs-xl); line-height: 1.5; color: var(--note-text) !important; }
.take-card .signature { display: block; margin-top: var(--space-3); font-family: var(--font-hand); font-size: var(--fs-sm); opacity: 0.8; }

.use-list { display: grid; gap: var(--space-3); list-style: none; padding: 0; }
.use-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.use-list svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: #2F7A55; }
:root[data-theme="dark"] .use-list svg { color: var(--sage-deep); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .use-list svg { color: var(--sage-deep); } }

.limits-card { background: var(--navy); color: var(--cream); border-color: var(--navy); }
:root[data-theme="dark"] .limits-card { background: #2A1F14; border-color: #4A3624; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .limits-card { background: #2A1F14; border-color: #4A3624; } }
.limits-card h2 { color: var(--accent); }
.limits-card h2 .num { background: var(--accent); }
.limits-card ul { display: grid; gap: var(--space-3); padding-left: 1.2rem; }
.limits-card li::marker { color: var(--accent); }
.limits-card li { color: #E8EBF0; }

.cta-card {
  text-align: center;
  padding: clamp(2rem, 1.2rem + 4vw, 3.5rem);
  background: var(--sage);
  color: var(--navy);
  border-color: transparent;
}
:root[data-theme="dark"] .cta-card { background: var(--surface-alt); color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-card { background: var(--surface-alt); color: var(--text); } }
.cta-card h2 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.cta-card p { margin-bottom: var(--space-5); }
.cta-card .btn-row { justify-content: center; }

.placeholder-note {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #DCE1E9;
  padding-block: var(--space-8) var(--space-5);
  margin-top: var(--space-8);
}
:root[data-theme="dark"] .site-footer { background: #0A111D; border-top: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #0A111D; border-top: 1px solid var(--border); } }
.site-footer a { color: var(--cream); }
.site-footer .logo { color: var(--cream); margin-bottom: var(--space-3); }
.footer-grid { display: grid; gap: var(--space-6); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-tagline { max-width: 22rem; color: #C9D0DB; }
.site-footer h2 {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}
.footer-links { display: grid; gap: var(--space-2); list-style: none; padding: 0; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-links .contact-item { display: inline-flex; align-items: center; gap: var(--space-2); }
.footer-links svg { width: 18px; height: 18px; flex: none; }
.footer-links .hint { display: block; font-size: var(--fs-xs); color: #A9B3C2; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(247, 244, 237, 0.14);
  font-size: var(--fs-sm);
  color: #B9C2CF;
}
.footer-bottom .hand { font-family: var(--font-hand); color: var(--sage); }

/* ---------- 15. Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .float { animation: float 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .float-delay { animation-delay: -3s; }
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover, .card-link:hover { transform: none; }
}

/* ---------- 16. Print ---------- */
@media print {
  .site-header, .site-footer, .btn, .toolbar { display: none !important; }
  body { background: #fff; color: #000; }
}
