/* ==========================================================================
   TUCSON KEI — "desert-meets-Japan" woodblock design system (v2 rebuild)
   Shared foundation for the sabinoweb theme. Loaded globally.
   Page templates port the inline-styled markup from new-sites/kei-two/*.dc.html;
   this file holds the tokens, base rules, and helper classes those pages share.
   ========================================================================== */

:root {
  --paper:      #F1EBDD;  /* primary background */
  --paper-deep: #E4DBC6;  /* cards / subtle fills */
  --ink:        #1A1915;  /* body text & rules */
  --accent:     #B8231C;  /* shu red — CTAs, focus, rules */
  --accent-dk:  #9c1c16;  /* accent hover */
  --muted:      #7A7468;  /* eyebrows & annotations */
  --hair:       #C9C0AD;  /* hairline dividers */
  --saguaro:    #4F6B4E;  /* status/success */
  --dusk:       #2E4057;  /* alt dark sections, footer */
  --font-display: 'Marcellus', 'Trajan Pro', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'DM Mono', ui-monospace, monospace;
  --font-jp:      'Noto Serif JP', 'Yu Mincho', serif;
}

/* ---- base (mirrors the drops' <helmet> <style>) ---- */
.tk-page * { box-sizing: border-box; }
.tk-page {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  margin: 0;
}
.tk-page a { color: var(--accent); text-decoration: none; }
.tk-page a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.tk-page ::selection { background: var(--accent); color: var(--paper); }
.tk-page img { max-width: 100%; }

/* The broad `.tk-page a` color rule (0,1,1) outranks single-class component
   rules, which would turn nav links and button text accent-red. These
   `.tk-page a.<class>` overrides (0,2,1) restore the intended colors. */
.tk-page a.tk-nav-link,
.tk-page a.tk-nav-link:hover { color: var(--ink); }
.tk-page a.tk-cta-primary,
.tk-page a.tk-cta-primary:hover { color: var(--paper); }
.tk-page a.tk-cta-ghost { color: var(--ink); }
.tk-page a.tk-cta-ghost:hover { color: var(--paper); }

/* ---- CTAs ---- */
.tk-cta-primary {
  font-family: var(--font-mono); font-weight: 500; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; background: var(--accent); color: var(--paper);
  padding: 16px 24px; text-decoration: none; display: inline-block;
  transition: background .18s ease;
}
.tk-cta-primary:hover { background: var(--accent-dk) !important; color: var(--paper) !important; text-decoration: none; }
.tk-cta-ghost {
  font-family: var(--font-mono); font-weight: 500; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink); padding: 16px 24px;
  border: 1px solid var(--ink); text-decoration: none; display: inline-block;
  transition: background .18s ease, color .18s ease;
}
.tk-cta-ghost:hover { background: var(--ink) !important; color: var(--paper) !important; text-decoration: none; }

/* ---- card hover lift ---- */
.tk-card-lift { transition: transform .18s ease; }
.tk-card-lift:hover { transform: translateY(-4px); }

/* ---- reusable eyebrow / rule / frame helpers ---- */
.tk-eyebrow {
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 10px;
}
.tk-rule { height: 2px; background: var(--accent); width: 72px; }
.tk-ghost-kanji {
  position: absolute; font-family: var(--font-jp); font-weight: 900;
  color: var(--ink); opacity: 0.055; line-height: 1; pointer-events: none; user-select: none;
}

/* ---- ケイ mark ---- */
.tk-kei-mark {
  background: var(--accent); display: inline-flex; align-items: center; justify-content: center;
}
.tk-kei-mark span { font-family: var(--font-jp); font-weight: 900; color: var(--paper); line-height: 1; }

/* ==========================================================================
   Header / footer (ported from Site-Header.dc.html / Site-Footer.dc.html)
   ========================================================================== */
.tk-header {
  background: var(--paper); border-bottom: 1px solid var(--hair);
  position: sticky; top: 0; z-index: 50; font-family: var(--font-body);
}
.tk-header-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.tk-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: 0 0 auto; }
/* Beat the global `.tk-page a:hover` (0,2,1) underline on the home/logo link. */
.tk-page a.tk-logo,
.tk-page a.tk-logo:hover,
.tk-page a.tk-logo:focus { text-decoration: none; }
.tk-nav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.tk-nav-link {
  position: relative; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
}
.tk-nav-link:hover { color: var(--ink); text-decoration: none; }
.tk-nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent);
}
/* Hairline bullet between nav items. */
.tk-nav-sep { color: var(--hair); font-size: 16px; line-height: 1; user-select: none; }
.tk-nav-cta {
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--paper) !important; background: var(--accent); text-decoration: none; padding: 10px 18px;
  margin-left: 14px; transition: background .18s ease;
}
.tk-nav-cta:hover { background: var(--accent-dk); text-decoration: none; }
.tk-mobile-toggle {
  margin-left: auto; display: none; background: none; border: 1px solid var(--ink); color: var(--ink);
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 9px 14px; cursor: pointer;
}
.tk-mobile-panel { border-top: 1px solid var(--hair); background: var(--paper); flex-direction: column; }
.tk-mobile-panel a {
  font-family: var(--font-mono); font-weight: 500; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding: 16px 24px; border-bottom: 1px solid var(--hair);
}
.tk-mobile-panel a.tk-nav-cta { color: var(--paper); background: var(--accent); padding: 18px 24px; border-bottom: 0; margin-left: 0; }
@media (max-width: 940px) {
  .tk-nav { display: none !important; }
  .tk-mobile-toggle { display: inline-block !important; }
}

.tk-footer { background: var(--dusk); color: var(--paper); font-family: var(--font-body); position: relative; overflow: hidden; }
.tk-footer a { color: var(--paper); text-decoration: none; }
.tk-footer a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
