/* ============================================================
   Dr Kiseki — Page component CSS
   Translates the design's inline `style-hover` / `style-focus`
   behaviours (from the custom design runtime) into real CSS,
   plus responsive nav, mobile CTA bar and modal show/hide.
   Base appearance is set by inline styles in the template;
   this file adds interaction + responsive + motion.
   ============================================================ */

html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
::selection { background: var(--kiseki-red-100); }

/* ---- Responsive nav / mobile CTA visibility ---- */
[data-desktop-nav] { display: flex; }
[data-menu-btn]    { display: none; }
[data-mobile-cta]  { display: none; }
body { padding-bottom: 0; }

@media (max-width: 960px) {
  [data-desktop-nav] { display: none !important; }
  [data-menu-btn]    { display: inline-flex !important; }
  [data-mobile-cta]  { display: flex !important; }
  body { padding-bottom: 72px; }
}

/* ---- FAQ accordion ---- */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] [data-chev] { transform: rotate(180deg); }

/* ============================================================
   Interaction: hover / focus states
   All transitions honour the brand motion token.
   ============================================================ */
.dk-navlink,
.dk-btn-primary,
.dk-btn-secondary,
.dk-btn-ghost-light,
.dk-guide-card,
.dk-topic-btn,
.dk-input,
.dk-link-cyan,
.dk-foot-link,
.dk-btn-wa {
  transition: color .2s var(--ease-standard),
              background-color .2s var(--ease-standard),
              border-color .2s var(--ease-standard),
              box-shadow .2s var(--ease-standard),
              transform .2s var(--ease-standard);
}

/* Nav links */
.dk-navlink:hover { color: var(--kiseki-red-600) !important; }

/* Primary red button → darken to red-700 */
.dk-btn-primary:hover { background: var(--kiseki-red-700) !important; }

/* Secondary (white) button → navy border + faint fill */
.dk-btn-secondary:hover {
  border-color: var(--kiseki-navy-800) !important;
  background: var(--neutral-50) !important;
}

/* Ghost button on dark navy band */
.dk-btn-ghost-light:hover { background: rgba(255,255,255,0.16) !important; }

/* Text / link-style buttons → underline */
.dk-link-red:hover { text-decoration: underline !important; }

/* Guide cards → lift with shadow + cyan border */
.dk-guide-card:hover {
  box-shadow: var(--shadow-md) !important;
  border-color: var(--kiseki-cyan-300) !important;
  transform: translateY(-3px);
}

/* Cyan link (on dark) → white */
.dk-link-cyan:hover { color: #fff !important; }

/* Footer links → white */
.dk-foot-link:hover { color: #fff !important; }

/* Angel topic buttons */
.dk-topic-btn:hover {
  border-color: var(--kiseki-red-500) !important;
  background: var(--kiseki-red-50) !important;
}
.dk-topic-btn.dk-topic-muted:hover {
  border-color: var(--kiseki-navy-800) !important;
  background: var(--neutral-50) !important;
}

/* WhatsApp send button → deep navy */
.dk-btn-wa:hover { background: var(--kiseki-navy-900) !important; }

/* Inputs / textarea focus → red border + focus ring */
.dk-input:focus {
  border-color: var(--kiseki-red-500) !important;
  box-shadow: var(--focus-ring) !important;
  outline: none;
}

/* ============================================================
   Photo placeholder (unassigned <image-slot> in the design)
   ============================================================ */
.dk-photo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(120px 120px at 50% 42%, rgba(0,160,208,0.10), rgba(0,160,208,0) 70%),
    var(--neutral-100);
  color: var(--neutral-400);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  padding: 12px;
}
.dk-photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   Modals (Angel + Booking)
   Shown/hidden by JS via the [hidden] attribute.
   ============================================================ */
.dk-modal[hidden] { display: none !important; }
.dk-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4,34,68,0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 560px) {
  .dk-modal { align-items: center; padding: 24px; }
  .dk-modal__sheet { border-radius: 24px !important; }
}

/* Step visibility inside modals */
.dk-step[hidden] { display: none !important; }

/* Mobile menu panel toggle */
.dk-mobile-menu[hidden] { display: none !important; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dk-guide-card:hover { transform: none; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ============================================================
   Section grids — force column counts (override inline auto-fit),
   responsive. Added after design review to keep rows intact.
   ============================================================ */
.dk-row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.dk-row-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
@media (max-width: 1080px) { .dk-row-5 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 960px)  { .dk-row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
                             .dk-row-5 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 560px)  { .dk-row-4, .dk-row-5 { grid-template-columns: 1fr !important; } }

/* "Who may consider" list — wrap to rows, last row centred, uniform width */
.dk-who { display: flex !important; flex-wrap: wrap; justify-content: center; }
.dk-who > * { flex: 0 1 240px; }

/* Hero CTA buttons — more compact on phones */
@media (max-width: 560px) {
  .dk-hero-cta { padding: 13px 18px !important; font-size: 15px !important; }
}

/* Comfortable button sizing on phones (all section CTAs; keep bottom bar compact) */
@media (max-width: 600px) {
  .dk-btn-primary, .dk-btn-secondary, .dk-btn-ghost-light {
    padding: 13px 20px !important;
    font-size: 15px !important;
  }
  /* Fixed bottom CTA bar — compact so it doesn't dominate the screen */
  [data-mobile-cta] {
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)) !important;
    gap: 8px !important;
  }
  [data-mobile-cta] a,
  [data-mobile-cta] button {
    padding: 9px 10px !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    gap: 6px !important;
    border-radius: 11px !important;
  }
  [data-mobile-cta] svg { width: 16px !important; height: 16px !important; }
  body { padding-bottom: 62px !important; }
}

/* Homepage "How it works" step cards — more compact on phones */
@media (max-width: 600px) {
  .dk-steps > div { padding: 16px 18px !important; }
  .dk-steps > div > div:first-child { font-size: 22px !important; margin-bottom: 4px !important; }
  .dk-steps h3 { font-size: 16px !important; }
  .dk-steps p  { font-size: 14.5px !important; }
}

/* ============================================================
   Testimonial photos on phones — stack the image above the text,
   centred and full-width so nothing overflows or gets cropped.
   (.dk-trow = image+text row, .dk-tcol = the image column)
   ============================================================ */
@media (max-width: 700px) {
  .dk-trow { justify-content: center !important; }
  .dk-tcol {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    align-self: auto !important;
    min-height: 0 !important;
    padding: 16px !important;
    justify-content: center !important;
    align-items: center !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
  }
  /* Single-image styles (side/tall/wide/padded): show whole photo, no crop, centred */
  .dk-tcol > img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 340px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    border-radius: 10px !important;
  }
}

/* Footer "Follow us" social icons */
.dk-social { transition: background .2s var(--ease-standard), color .2s var(--ease-standard), transform .2s var(--ease-standard); }
.dk-social:hover { background: rgba(255,255,255,0.18) !important; color: #fff !important; transform: translateY(-2px); }

/* Language switcher — always visible in the header on mobile (desktop keeps the nav one) */
.dk-lang-mobile { display: none; align-items: center; }
@media (max-width: 960px) { .dk-lang-mobile { display: inline-flex !important; } }
