/*
Theme Name: MyTailwind
Author:     You
Description: WooCommerce-ready, Tailwind-powered WordPress theme. Light mode only. Noir & Indigo system.
Text Domain: mytailwind
*/

/* Light mode only — no dark variant */

/* ─── Tromboo Design Tokens — Noir & Indigo ────────────────── */
:root {
  /* Core palette — --p-* names kept for Tailwind @theme compat */
  --p-bg:      #ffffff;
  --p-surface: #ffffff;
  --p-ink:     #000000;
  --p-inkMut:  #6b6878;
  --p-line:    #e7e5ee;
  --p-primary: #23155f;
  --p-accent:  #23155f;   /* repurposed: gold retired, accent = indigo */
  --p-sale:    oklch(0.5 0.16 25);

  /* Extended semantic tokens */
  --bg:           #ffffff;   /* alias of --p-bg; dark sections reference var(--bg) inline */
  --surface:       #ffffff;
  --surface-soft:  #f3f1f9;   /* indigo tint — was warm beige */
  --ink:           #000000;
  --ink-soft:      #1a1a1a;
  --mute:          #6b6878;
  --rule:          #e7e5ee;
  --primary:       #23155f;
  --primary-deep:  #2e1c7a;
  --primary-tint:  #f3f1f9;
  --indigo:        #23155f;   /* explicit alias — use where semantic clarity helps */
  --indigo-2:      #2e1c7a;
  --indigo-tint:   #f3f1f9;
  --gold:          #23155f;   /* REPURPOSED — gold accent retired, now = indigo */
  --gold-deep:     #2e1c7a;   /* REPURPOSED — now = indigo-2 */
  --danger:        oklch(0.5 0.16 25);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-script:  'Great Vibes', cursive;          /* NEW — use sparingly */
  --font-body:    'Inter', system-ui, sans-serif;  /* was Plus Jakarta Sans */
  --font-mono:    'JetBrains Mono', monospace;

  /* Fluid type scale — unchanged */
  --step--2: clamp(0.75rem,  0.69rem + 0.26vw, 0.875rem);
  --step--1: clamp(0.875rem, 0.82rem + 0.29vw, 1rem);
  --step-0:  clamp(1rem,     0.94rem + 0.31vw, 1.125rem);
  --step-1:  clamp(1.125rem, 1.01rem + 0.57vw, 1.375rem);
  --step-2:  clamp(1.25rem,  1.09rem + 0.82vw, 1.75rem);
  --step-3:  clamp(1.5rem,   1.25rem + 1.27vw, 2.25rem);
  --step-4:  clamp(1.875rem, 1.5rem  + 1.88vw, 3rem);
  --step-5:  clamp(2.25rem,  1.72rem + 2.63vw, 3.75rem);
  --step-6:  clamp(2.75rem,  1.98rem + 3.84vw, 5.25rem);

  /* Layout — unchanged */
  --gutter:        clamp(1.25rem, 4vw, 2.5rem);
  --section-pad:   clamp(3rem, 7vw, 8rem);
  --section-tight: clamp(2rem, 5vw, 5rem);

  /* Shadow — updated to pure black base */
  --shadow-soft: 0 2px 8px -2px rgb(0 0 0 / 0.07), 0 1px 3px -1px rgb(0 0 0 / 0.04);
  --shadow-card: 0 4px 24px -4px rgb(0 0 0 / 0.09), 0 1px 4px -1px rgb(0 0 0 / 0.05);
}


body {
  background: var(--p-bg);
  color: var(--p-ink);
  font-family: var(--font-body);
}

/* Homepage photography is portrait; object-cover crops it in cards, rails and
   the mosaic. Anchor every crop to the top so heads/necklines are not clipped. */
body.home img {
  object-position: top;
}

/* ─── Header ──────────────────────────────────────────────── */
#main-header {
  transition: box-shadow 0.35s ease, background-color 0.35s ease, border-color 0.35s ease;
}
#main-header.is-scrolled {
  box-shadow: 0 2px 20px -4px rgb(26 18 32 / 0.10);
}
#main-header #menu-primary li a {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: none;
  font-weight: 500;
  color: var(--p-ink) !important;
  text-decoration: none;
  transition: color 0.3s ease;
}
#main-header #menu-primary li a:hover {
  color: var(--p-primary) !important;
}
#main-header #menu-primary li {
  display: flex;
  align-items: center;
}
#main-header #menu-primary li.current-menu-item > a,
#main-header #menu-primary li.current_page_item > a {
  color: var(--p-primary) !important;
}
#main-header #menu-primary li.current-menu-item > a::before,
#main-header #menu-primary li.current_page_item > a::before {
  content: "";
  display: inline-block;
  width: 0.25rem;
  height: 0.25rem;
  margin-right: 0.5rem;
  border-radius: 999px;
  background: var(--p-primary);
  vertical-align: middle;
}

/* ─── Header chameleon — over dark sections ───────────────── */
#main-header .text-ink,
#main-header .text-mute,
#main-header .text-primary,
#main-header a,
#main-header button {
  transition: color 0.3s ease;
}
#main-header.over-dark {
  background-color: rgb(0 0 0 / 0.15) !important;
  border-bottom-color: rgb(255 255 255 / 0.12) !important;
}
#main-header.over-dark .text-ink { color: #ffffff !important; }
#main-header.over-dark .text-mute { color: rgba(255,255,255,0.5) !important; }
#main-header.over-dark .text-primary { color: rgba(255,255,255,0.75) !important; }
#main-header.over-dark .border-rule { border-color: rgb(255 255 255 / 0.2) !important; }
#main-header.over-dark .bg-surface-soft {
  background-color: rgb(255 255 255 / 0.08) !important;
  border-color: rgb(255 255 255 / 0.2) !important;
}
#main-header.over-dark #menu-primary li a { color: #ffffff !important; }
#main-header.over-dark #menu-primary li a:hover { color: rgba(255,255,255,0.65) !important; }
#main-header.over-dark #menu-primary li.current-menu-item > a,
#main-header.over-dark #menu-primary li.current_page_item > a { color: rgba(255,255,255,0.9) !important; }
#main-header.over-dark #menu-primary li.current-menu-item > a::before,
#main-header.over-dark #menu-primary li.current_page_item > a::before { background: #ffffff; }

/* fill-ink SVGs (user icon etc.) flip white over dark sections */
#main-header.over-dark .fill-ink { fill: #ffffff !important; }
/* Cart trigger always has white bg — keep fill dark */
#main-header.over-dark .cart-wrapper .cart-trigger .fill-ink { fill: var(--ink) !important; }

/* Cart trigger — always has white bg, keep all ink colors */
#main-header.over-dark .cart-wrapper .cart-trigger { color: var(--ink) !important; border-color: var(--rule) !important; }
#main-header.over-dark .cart-wrapper .cart-trigger .text-ink { color: var(--ink) !important; }
#main-header.over-dark .cart-wrapper .cart-trigger .border-rule { border-color: var(--rule) !important; }

/* Mini-cart panel — always light bg, keep dark text; text-bg elements (checkout btn) stay as-is */
#main-header.over-dark #mini-cart-panel { color: var(--ink) !important; }
#main-header.over-dark #mini-cart-panel .text-ink { color: var(--ink) !important; }
#main-header.over-dark #mini-cart-panel .text-mute { color: var(--mute) !important; }
#main-header.over-dark #mini-cart-panel .border-rule,
#main-header.over-dark #mini-cart-panel .border-line { border-color: var(--rule) !important; }

/* ─── Logo image swap ────────────────────────────────────────── */
.logo-light, .logo-purple { display: none; }
#main-header.over-dark .logo-dark  { display: none; }
#main-header.over-dark .logo-light { display: block; }


/* ─── WooCommerce ─────────────────────────────────────────── */
.added_to_cart.wc-forward { display: none !important; }

/* ─── Wishlist (YITH) ─────────────────────────────────────── */
.my-wishlist-wrap .yith-wcwl-add-to-wishlist-button .yith-wcwl-icon,
.my-wishlist-wrap .yith-wcwl-add-to-wishlist-button__label { display:none !important; }

.my-wishlist-wrap .yith-wcwl-add-to-wishlist-button,
.my-wishlist-wrap .yith-wcwl-add-to-wishlist,
.my-wishlist-wrap .add_to_wishlist {
  opacity: 0; pointer-events: none;
}

.my-wishlist-overlay .icon-solid { display: none; }
.my-wishlist-overlay.is-solid .icon-light { display: none; }
.my-wishlist-overlay.is-solid .icon-solid { display: inline-flex; }

.yith-wcwl-feedback-messages-container{ display: none !important; }

/* ─── Mobile drawer ───────────────────────────────────────── */
#tablet-drawer {
  top: var(--drawer-top, 64px);
  bottom: var(--drawer-bottom, 0px);
  transform: translateX(-100%);
  transition: transform 200ms ease;
  will-change: transform;
}
#tablet-drawer.is-open {
  transform: translateX(0);
  /* Guard: Tailwind v4 translate-* utilities set the independent `translate`
     property, which `transform` cannot cancel. Reset it so a stray class
     (now or later) can never strand the panel off-screen again. */
  translate: none;
}

/* ── Mobile menu toggle: hamburger ↔ left arrow ──────────────────
 * The drawer is the header's immediate next sibling (header.php), so
 * :has(+ #tablet-drawer.is-open) drives the icon with CSS alone — no JS,
 * and no risk of it desyncing from whichever of the two drawer handlers
 * (theme.js / tnm-header.js) toggled .is-open.
 * Both icons occupy the same box; they cross-fade and slide a few px
 * toward each other, so the swap reads as a direction rather than a swap. */
#tablet-menu-toggle .tmt-icon {
  display: block;
  transition: opacity 200ms ease, transform 200ms ease;
}
#tablet-menu-toggle .tmt-icon--back {
  position: absolute; inset: 0; margin: auto;
  opacity: 0;
  transform: translateX(6px);
}
#main-header:has(+ #tablet-drawer.is-open) #tablet-menu-toggle .tmt-icon--menu {
  opacity: 0;
  transform: translateX(-6px);
}
#main-header:has(+ #tablet-drawer.is-open) #tablet-menu-toggle .tmt-icon--back {
  opacity: 1;
  transform: translateX(0);
}
#tablet-backdrop {
  top: var(--drawer-top, 64px);
  bottom: var(--drawer-bottom, 0px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
#tablet-backdrop.is-open { opacity: 1; pointer-events: auto; }
#tablet-drawer .menu a {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--p-line);
  color: inherit;
  text-decoration: none;
}

.sub-menu { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.menu-item-has-children.open .sub-menu { max-height: 400px; }

/* ─── Footer ──────────────────────────────────────────────── */
.hairline {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(35,21,95,0.22), transparent);
}
.wordmark {
  position: absolute; bottom: -0.1em; left: 0; right: 0;
  font-family: var(--font-display);
  font-size: 18vw; font-weight: 700; line-height: 1;
  color: rgb(255 255 255 / 0.03); text-align: center;
  pointer-events: none; user-select: none; letter-spacing: -0.02em;
}
.eyebrow {
  display: block;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mute);
}
.link-row {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: rgba(255,255,255,0.6);
  text-decoration: none; padding: 0.25rem 0; transition: color 0.2s;
}
.link-row:hover { color: #fff; }
.link-row .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
  opacity: 0; transform: scale(0.4);
  transition: opacity 0.2s, transform 0.2s;
}
.link-row:hover .dot { opacity: 1; transform: scale(1); }
.pill {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.35rem 0.75rem; border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 0.75rem; color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.pill:hover { border-color: rgba(255,255,255,0.35); color: #fff; background: rgba(255,255,255,0.06); }
.nl-input {
  flex: 1; min-width: 0; padding: 0.625rem 1rem;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 0.5rem; color: #fff; font-size: 0.875rem;
  outline: none; transition: border-color 0.2s;
}
.nl-input::placeholder { color: rgba(255,255,255,0.35); }
.nl-input:focus { border-color: rgba(255,255,255,0.4); }
.nl-btn {
  padding: 0.625rem 1.25rem; white-space: nowrap;
  background: var(--ink); color: #fff;
  border-radius: 0; border: none;
  font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.nl-btn:hover { background: var(--primary); }
details.footer-menu > summary { list-style: none; }
details.footer-menu > summary::-webkit-details-marker { display: none; }
details.footer-menu .footer-chev { transition: transform 0.25s; }
details.footer-menu[open] .footer-chev { transform: rotate(180deg); }
@media (min-width: 1024px) {
  details.footer-menu > :not(summary) { display: block !important; }
  details.footer-menu .footer-chev { display: none; }
}

/* ─── Scroll-reveal ───────────────────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* ─── Placeholder image (ph) utilities ───────────────────── */
.ph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg,
      color-mix(in oklch, var(--p-ink) 6%, transparent) 0,
      color-mix(in oklch, var(--p-ink) 6%, transparent) 1px,
      transparent 1px, transparent 9px),
    linear-gradient(180deg,
      color-mix(in oklch, var(--p-primary) 7%,  var(--p-bg)) 0%,
      color-mix(in oklch, var(--p-primary) 12%, var(--p-bg)) 100%);
}
.ph-dark {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px,
      transparent 1px, transparent 9px),
    linear-gradient(160deg,
      color-mix(in oklch, var(--p-primary) 65%, var(--p-ink))  0%,
      color-mix(in oklch, var(--p-ink)    90%, black)          100%);
}
.ph-tint-a { background-color: color-mix(in oklch, var(--p-accent)  22%, var(--p-ink)); }
.ph-tint-b { background-color: color-mix(in oklch, var(--p-primary) 70%, var(--p-ink)); }
.ph-tint-c { background-color: color-mix(in oklch, var(--p-sale)    18%, var(--p-ink)); }
.ph-tint-d { background-color: color-mix(in oklch, var(--p-primary) 40%, var(--p-ink)); }
.ph-tint-e { background-color: color-mix(in oklch, var(--p-accent)  35%, var(--p-ink)); }
.ph-mark {
  position: absolute; top: 1rem; left: 1.25rem;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.ph-mark .dot { width: 4px; height: 4px; border-radius: 9999px; background: currentColor; }

/* ─── Tromboo component utilities ────────────────────────── */
.tromboo-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--mute);
}
.tromboo-link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--rule);
  padding-bottom: 2px; transition: color 0.2s, border-color 0.2s;
}
.tromboo-link-arrow:hover { color: var(--primary); border-color: var(--primary); }

/* Channel cards (contact page) */
.channel-card {
  background: var(--p-bg);
  padding: 28px 24px; display: grid; gap: 8px;
}
.channel-card__icon { color: var(--primary); margin-bottom: 6px; }
.channel-card h2 { font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; color: var(--ink); }
.channel-card p { font-size: 13px; color: var(--mute, #7a6f80); }

/* Atelier info list (contact page) */
.atelier-info { display: grid; gap: 12px; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.atelier-info > div { display: grid; grid-template-columns: 90px 1fr; gap: 16px; }
.atelier-info dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); padding-top: 2px; }
.atelier-info dd { margin: 0; font-size: 14px; color: var(--surface); }
.atelier-info a { color: inherit; text-decoration: none; }
.atelier-info a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 480px) {
  .atelier-info > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ─── Legacy page-home-trial (kept until homepage rebuild) ── */
.page-home-trial .hero-section,
.page-home-trial .hero-inner { min-height: calc(100svh - 96px); }
.page-home-trial .hero-ink {
  background:
    radial-gradient(900px 520px at 15% 100%, color-mix(in oklch, var(--p-primary) 65%, var(--p-ink)) 0%, transparent 60%),
    radial-gradient(700px 400px at 92% 4%,   color-mix(in oklch, var(--p-accent)  30%, var(--p-ink)) 0%, transparent 55%),
    var(--p-ink);
}
.page-home-trial .hero-headline { font-size: clamp(48px, 7.4vw, 96px); line-height: 0.98; }
.page-home-trial .hero-intro { font-size: clamp(18px, 1.4vw, 22px); }
.page-home-trial .hero-accent-word { color: color-mix(in oklch, var(--p-accent) 70%, var(--p-bg)); }
.page-home-trial .mosaic-card { position: relative; isolation: isolate; }
.page-home-trial .mosaic-card::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 30%, color-mix(in oklch, var(--p-ink) 85%, transparent) 100%);
}
.page-home-trial .mosaic-card .mosaic-content { position: relative; z-index: 2; }
.page-home-trial .mosaic-grid { grid-auto-rows: minmax(220px, auto); }
.page-home-trial .newsletter-section { background: color-mix(in oklch, var(--p-accent) 85%, var(--p-ink)); }
.page-home-trial .newsletter-texture { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 14px); }

/* ─── Script font utility ─────────────────────────────────── */
.font-script { font-family: var(--font-script); font-weight: 400; }

/* ─── Indigo stripe placeholder ──────────────────────────── */
.ph-indigo-stripe {
  background: repeating-linear-gradient(135deg,
    var(--indigo-tint) 0 12px,
    var(--p-bg) 12px 24px);
}
