/* Tamakkin Header + Hero Brand Fix
   Scope: header brand visibility + hero typography hierarchy only. */

/* ---------- Header brand beside logo ---------- */
.site-header .brand,
.site-header .logo,
header .brand,
header .logo,
.navbar .brand,
.navbar .logo,
.header-brand,
.brand-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.site-header .brand-text,
header .brand-text,
.navbar .brand-text,
.header-brand-text,
.logo-text,
.brand-title-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  line-height: 1.05 !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.site-header .brand-name,
header .brand-name,
.navbar .brand-name,
.logo-title,
.brand-main {
  display: block !important;
  color: var(--text, #10251f) !important;
  font-size: clamp(15px, 1.45vw, 18px) !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  letter-spacing: -0.02em !important;
}

.site-header .brand-subtitle,
header .brand-subtitle,
.navbar .brand-subtitle,
.logo-subtitle,
.brand-tagline,
.brand-sub {
  display: block !important;
  color: #0f8a64 !important;
  font-size: clamp(10.5px, .95vw, 12.5px) !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  opacity: 1 !important;
  visibility: visible !important;
  max-width: none !important;
  overflow: visible !important;
  margin-top: 2px !important;
}

html[data-theme="dark"] .site-header .brand-name,
body.dark .site-header .brand-name,
html[data-theme="dark"] header .brand-name,
body.dark header .brand-name,
html[data-theme="dark"] .navbar .brand-name,
body.dark .navbar .brand-name {
  color: #f8fafc !important;
}

html[data-theme="dark"] .site-header .brand-subtitle,
body.dark .site-header .brand-subtitle,
html[data-theme="dark"] header .brand-subtitle,
body.dark header .brand-subtitle,
html[data-theme="dark"] .navbar .brand-subtitle,
body.dark .navbar .brand-subtitle {
  color: #86efac !important;
}

/* Mobile: keep subtitle visible, but compact */
@media (max-width: 760px) {
  .site-header .brand,
  .site-header .logo,
  header .brand,
  header .logo,
  .navbar .brand,
  .navbar .logo,
  .header-brand,
  .brand-link {
    gap: 8px !important;
    max-width: 62vw !important;
  }

  .site-header .brand-name,
  header .brand-name,
  .navbar .brand-name,
  .logo-title,
  .brand-main {
    font-size: 14.5px !important;
  }

  .site-header .brand-subtitle,
  header .brand-subtitle,
  .navbar .brand-subtitle,
  .logo-subtitle,
  .brand-tagline,
  .brand-sub {
    display: block !important;
    font-size: 10.2px !important;
    line-height: 1.1 !important;
    opacity: 1 !important;
  }
}

/* ---------- Hero typography hierarchy ---------- */
.tmk-hero-brand-title {
  align-items: flex-end !important;
  text-align: right !important;
  margin-inline: 0 auto !important;
  gap: .38rem !important;
  max-width: 760px !important;
}

.tmk-hero-name {
  font-size: clamp(2.85rem, 5.6vw, 5.15rem) !important;
  line-height: .94 !important;
  font-weight: 950 !important;
  letter-spacing: -0.045em !important;
  white-space: nowrap !important;
  color: #10251f !important;
}

.tmk-hero-subtitle-brand {
  display: inline-flex !important;
  width: fit-content !important;
  font-size: clamp(1.05rem, 2vw, 1.72rem) !important;
  line-height: 1.18 !important;
  font-weight: 850 !important;
  letter-spacing: -0.02em !important;
  padding: .42rem .82rem !important;
  border-radius: 999px !important;
  background: rgba(15, 138, 100, .09) !important;
  border: 1px solid rgba(15, 138, 100, .14) !important;
  color: #0f8a64 !important;
  margin-inline: 0 !important;
  white-space: nowrap !important;
}

html[data-theme="dark"] .tmk-hero-name,
body.dark .tmk-hero-name {
  color: #f8fafc !important;
}

html[data-theme="dark"] .tmk-hero-subtitle-brand,
body.dark .tmk-hero-subtitle-brand {
  color: #86efac !important;
  background: rgba(134,239,172,.11) !important;
  border-color: rgba(134,239,172,.18) !important;
}

.hero p,
.hero .hero-copy,
.hero .hero-description {
  text-align: right !important;
  margin-inline: 0 auto !important;
  max-width: 680px !important;
}

@media (max-width: 760px) {
  .tmk-hero-brand-title {
    width: 100% !important;
    align-items: flex-end !important;
    text-align: right !important;
    margin-inline: 0 auto !important;
    gap: .44rem !important;
  }

  .tmk-hero-name {
    font-size: clamp(2.65rem, 11.5vw, 3.9rem) !important;
    line-height: .94 !important;
  }

  .tmk-hero-subtitle-brand {
    font-size: clamp(1rem, 4.4vw, 1.36rem) !important;
    padding: .42rem .76rem !important;
    line-height: 1.18 !important;
  }

  .hero p,
  .hero .hero-copy,
  .hero .hero-description {
    text-align: right !important;
    max-width: 100% !important;
  }
}

/* iOS Safari AI Assistant Zoom Fix */
.ai-assistant input,
.ai-assistant textarea,
.ai-chat-input,
.ai-assistant-panel textarea,
.ai-widget-panel textarea {
  font-size: 16px !important;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .ai-assistant-panel,
  .ai-chat-panel,
  .ai-widget-panel {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    left: 12px !important;
    right: auto !important;
    transform: none !important;
    overflow-x: hidden !important;
  }

  .ai-assistant-panel * {
    max-width: 100%;
    box-sizing: border-box;
  }
}
