/**
 * T&D Japan 2026 — Design tokens
 * Source of truth for brand surfaces (also mirrored in Tailwind config / theme_mod).
 */
:root {
  --tdj-sunago: #D2913D;
  --tdj-forest: #36692C;
  --tdj-sumi: #1C1C1C;
  --tdj-washi: #F5F3EF;
  /* RGB channels consumed by compiled Tailwind utilities (bg-sumi, text-washi, …).
     Overridden at runtime by functions.php from the Brand Colors / Customizer values.
     Keep in sync with the hex tokens above. */
  --tdj-sunago-rgb: 210 145 61;
  --tdj-forest-rgb: 54 105 44;
  --tdj-sumi-rgb: 28 28 28;
  --tdj-washi-rgb: 245 243 239;
  --tdj-white: #FFFFFF;
  --tdj-muted: #6B7280;
  --tdj-radius: 2px;
  --tdj-ease: cubic-bezier(0.25, 1, 0.5, 1);
  --tdj-header-h: 72px;
  --tdj-space-section: clamp(4rem, 8vw, 7rem);
  --tdj-shadow-card: 0 10px 40px rgba(0, 0, 0, 0.05);
  --tdj-shadow-lift: 0 24px 50px rgba(54, 105, 44, 0.14);
  --tdj-max: 1600px;
}

@media (prefers-reduced-motion: reduce) {
  .zen-reveal,
  .tdj-hero-anim,
  .tdj-hero-anim-2,
  .tdj-hero-anim-3,
  .tdj-svc-card,
  .ease-zen {
    transition: none !important;
    animation: none !important;
  }
  .zen-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .animate-pulse,
  .tdj-hero-anim,
  [class*="animate-"] {
    animation: none !important;
  }
  html { scroll-behavior: auto !important; }
}

.tdj-skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--tdj-sunago);
  color: var(--tdj-sumi);
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
}
.tdj-skip-link:focus {
  top: 1rem;
}

.tdj-trust-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .tdj-trust-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tdj-mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;
  gap: 0;
  background: color-mix(in srgb, var(--tdj-washi) 92%, white);
  border-top: 1px solid rgba(28, 28, 28, 0.08);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08);
  padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
}
@media (max-width: 767px) {
  .tdj-mobile-cta {
    display: flex;
  }
  body.has-mobile-cta {
    padding-bottom: 5.5rem;
  }
}
.tdj-mobile-cta a {
  flex: 1;
  text-align: center;
  padding: 0.85rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}
.tdj-mobile-cta a.primary {
  background: var(--tdj-sunago);
  color: var(--tdj-sumi);
}
.tdj-mobile-cta a.secondary {
  background: var(--tdj-forest);
  color: var(--tdj-washi);
}
.tdj-mobile-cta a.ghost {
  background: color-mix(in srgb, var(--tdj-forest) 10%, white);
  color: var(--tdj-forest);
}

/* ---- Global accessibility: visible focus rings ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--tdj-sunago);
  outline-offset: 2px;
  border-radius: 2px;
}
/* Only suppress the default ring where we provide our own :focus-visible. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

.tdj-property-card {
  box-shadow: var(--tdj-shadow-card);
}
.tdj-property-card:hover {
  box-shadow: var(--tdj-shadow-lift);
}
.tdj-property-card.zen-reveal.visible,
#property-grid .tdj-property-card {
  opacity: 1;
  transform: none;
}

/* Alpine cloak — hide reactive-only nodes until store hydrates */
[x-cloak] { display: none !important; }

/* ---- Favorites (heart toggle) ---- */
.tdj-fav-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  transition: fill 0.3s ease, transform 0.3s var(--tdj-ease);
}
.tdj-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  cursor: pointer;
  color: #fff;
  background: color-mix(in srgb, var(--tdj-sumi) 42%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: background 0.3s ease, transform 0.3s var(--tdj-ease);
}
.tdj-fav-btn:hover { transform: scale(1.07); }
.tdj-fav-btn:focus-visible { outline: 2px solid var(--tdj-sunago); outline-offset: 2px; }
.tdj-fav-btn.is-active { background: #fff; }
.tdj-fav-btn.is-active .tdj-fav-icon { fill: var(--tdj-sunago); stroke: var(--tdj-sunago); }
.tdj-fav-btn--card {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 20;
  width: 40px;
  height: 40px;
}
.tdj-fav-btn--hero {
  width: 48px;
  height: 48px;
  background: color-mix(in srgb, var(--tdj-sumi) 58%, transparent);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.tdj-fav-save { cursor: pointer; }
.tdj-fav-save:hover { border-color: var(--tdj-sunago); color: var(--tdj-sunago); }
.tdj-fav-save .tdj-fav-icon { fill: none; stroke: currentColor; }
.tdj-fav-save.is-active-detail {
  background: var(--tdj-sunago);
  color: var(--tdj-sumi);
  border-color: var(--tdj-sunago);
}
.tdj-fav-save.is-active-detail .tdj-fav-icon { fill: var(--tdj-sumi); stroke: var(--tdj-sumi); }

/* ---- Chat / social buttons ---- */
.tdj-social-group { margin-top: 1.5rem; }
.tdj-social-title {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}
.tdj-social-group--light .tdj-social-title { color: var(--tdj-washi); }
.tdj-social-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tdj-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.05rem;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 1px solid rgba(28, 28, 28, 0.12);
  background: var(--tdj-white);
  color: var(--tdj-sumi);
  transition: background 0.3s var(--tdj-ease), color 0.3s var(--tdj-ease), border-color 0.3s var(--tdj-ease), transform 0.3s var(--tdj-ease);
}
.tdj-social-btn__icon { color: var(--tdj-chat); display: inline-flex; }
.tdj-social-btn:hover {
  background: var(--tdj-chat);
  color: #fff;
  border-color: var(--tdj-chat);
  transform: translateY(-1px);
}
.tdj-social-btn:hover .tdj-social-btn__icon { color: #fff; }
.tdj-social-group--light .tdj-social-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--tdj-washi);
  border-color: rgba(255, 255, 255, 0.28);
}
.tdj-social-group--light .tdj-social-btn__icon { color: #fff; }
.tdj-social-group--light .tdj-social-btn:hover {
  background: var(--tdj-chat);
  border-color: var(--tdj-chat);
  color: #fff;
}
