/* 
    Theme Name: TCH Classic Theme
    Author: Neboch
    Description: Compoennt Driven, classic theme
    Version: 1.0
 */

html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: #1d293d;
}

/* reset.css */
@layer reset {
  /* 1) Box sizing + remove default margins */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  * {
    margin: 0;
  }

  /* 2) Sensible defaults */
  html:focus-within {
    scroll-behavior: smooth;
  }

  /* html, body { 
    height: 100%; - Removed to prevent scroll-to-top on overflow: hidden 
  } */

  body {
    min-height: 100%;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  /* 3) Media elements behave predictably */
  img,
  picture,
  video,
  canvas,
  svg {
    display: block;
    max-width: 100%;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  a:active,
  a:hover {
    text-decoration: none;
  }

  /* 4) Typography: inherit into form controls */
  input,
  button,
  textarea,
  select {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    word-spacing: inherit;
  }

  /* 5) “Unstyle” buttons so components start neutral */
  button,
  [type="button"],
  [type="reset"],
  [type="submit"] {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
  }

  /* Keep the expected cursor for clickable things */
  :where(
    button,
    [role="button"],
    [type="button"],
    [type="reset"],
    [type="submit"],
    summary
  ) {
    cursor: pointer;
  }

  /* Links inherit color (you style links explicitly in components) */
  a {
    color: inherit;
  }

  /* Lists: remove bullets only when you opt in with role="list" */
  :where(ul[role="list"], ol[role="list"]) {
    list-style: none;
    padding: 0;
  }

  /* Tables */
  table {
    border-collapse: collapse;
    border-spacing: 0;
  }

  /* Forms: avoid overflow issues in flex/grid */
  :where(input, textarea, select) {
    min-width: 0;
  }

  textarea {
    resize: vertical;
  }

  fieldset {
    border: 0;
    min-width: 0;
    padding: 0;
    margin: 0;
  }

  /* Prevent ugly text overflow */
  :where(p, h1, h2, h3, h4, h5, h6) {
    overflow-wrap: break-word;
  }

  /* 6) Accessible focus styles */
  :where(:focus-visible) {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  :where(:focus:not(:focus-visible)) {
    outline: none;
  }

  /* 7) Respect reduced motion preferences */
  @media (prefers-reduced-motion: reduce) {
    html:focus-within {
      scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}

/* --- GLOBAL SCROLLBAR STYLING --- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f2f6;
}

::-webkit-scrollbar-thumb {
  background: #45556c;
  border-radius: 10px;
  border: 2px solid #f1f2f6;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #0f172b;
}

/* Firefox Support */
* {
  scrollbar-width: thin;
  scrollbar-color: #45556c #f1f2f6;
}

/* --- UTILITIES --- */
.is-locked,
html.is-locked,
body.is-locked {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

:root {
  --theme-border: #d9dde3;
  --theme-surface: #f7f8fa;
  --theme-surface-strong: #ffffff;
  --theme-text: #17202a;
  --theme-text-muted: #5f6b7a;
  --theme-accent: #1d4ed8;
  --theme-width: min(1120px, calc(100% - 2rem));
  --CTA-Default: #fe9a00;
  --CTA-Shadow:
    0 20px 25px -5px rgba(254, 154, 0, 0.2),
    0 8px 10px -6px rgba(254, 154, 0, 0.2);
}

body {
  color: var(--theme-text);
  background: var(--theme-surface-strong);
}

main {
  display: block;
}

p,
ul,
ol {
  margin: 0;
}

.content-page {
  background-color: #1d293d;
}

.content-page__container,
.listing-page__container,
.document-page__container,
.single-post-page__container,
.contact-page__container,
.empty-state__container {
  width: var(--theme-width);
  margin: 0 auto;
}

.content-page__main,
.document-page__article,
.single-post-page__article,
.contact-page__content {
  /* padding: 3rem 0 4rem; */
}

.content-page__intro,
.listing-page__header,
.single-post-page__header {
  padding: 3rem 0 2rem;
}

.content-page__intro-title,
.listing-page__title,
.single-post-page__title,
.document-page__content h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.content-page__intro-copy,
.document-page__content,
.single-post-page__content,
.post-card__excerpt {
  color: var(--theme-text-muted);
  line-height: 1.7;
}

.content-page-layout {
  padding: 2rem 0 4rem;
}

.content-page-layout__container {
  width: var(--theme-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2rem;
}

.content-page-layout__container--no-toc {
  grid-template-columns: minmax(0, 1fr);
}

.content-page-sections {
  min-width: 0;
}

.listing-page__intro,
.single-post-page__meta,
.document-page__content time,
.post-card__meta,
.empty-state__eyebrow {
  color: var(--theme-text-muted);
}

.post-list {
  display: grid;
  gap: 1rem;
  padding-bottom: 3rem;
}

.post-card {
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-strong);
}

.post-card__link {
  display: block;
  padding: 1.25rem;
}

.post-card__content {
  display: grid;
  gap: 0.75rem;
}

.post-card__title {
  font-size: 1.4rem;
}

.pagination-wrap {
  padding-bottom: 4rem;
}

.contact-page__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 2rem;
  padding: 3rem 0;
}

.contact-page__details {
  display: grid;
  gap: 1rem;
  padding: 1.5rem 0;
  list-style: none;
}

.contact-page__detail-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.contact-page__detail-item--legal-assistance {
  font-weight: 700;
}

.contact-page__detail-item--legal-assistance a {
  text-decoration: underline;
}

.contact-page__phone-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.3rem;
  border-radius: 6px;
  background: var(--CTA-Default);
  color: #0f172b;
  font-family: "Neuzeit Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.contact-page__phone-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--CTA-Shadow);
}

.contact-page__detail-item svg {
  width: 1.25rem;
  flex: 0 0 auto;
}

.contact-page__socials {
  display: flex;
  gap: 0.75rem;
}

.contact-page__social-link {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--theme-border);
}

.contact-page__card {
  padding: 1.5rem;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
}

.contact-page__card-header {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.wpforms-field-container,
.contact-page form {
  display: grid;
  gap: 1.5rem;
}

.wpforms-container .wpforms-field-label,
.wpforms-container .wpforms-field-sublabel,
.contact-page form label {
  display: block;
  font-family: "Neuzeit Grotesk", sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  margin-bottom: 0.75rem !important;
}

.wpforms-form .wpforms-field-sublabel {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6) !important;
  margin-top: 5px;
  text-transform: none;
  letter-spacing: normal;
}

.wpforms-required-label {
  color: var(--CTA-Default) !important;
  margin-left: 4px;
}

.wpforms-form input[type="text"],
.wpforms-form input[type="email"],
.wpforms-form input[type="url"],
.wpforms-form input[type="number"],
.wpforms-form textarea,
.wpforms-form select,
.contact-page form input,
.contact-page form textarea,
.contact-page form select {
  width: 100%;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 4px;
  background: #fff;
  color: #0f172b;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.wpforms-form input:focus,
.wpforms-form textarea:focus {
  outline: none;
  border-color: var(--CTA-Default);
}

.wpforms-submit,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 2.5rem;
  border-radius: 5px;
  font-family: "Neuzeit Grotesk", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.button-primary,
.wpforms-submit {
  background: var(--CTA-Default);
  color: #0f172b; /* Dark text on orange button */
}

.button-primary:hover,
.wpforms-submit:hover {
  box-shadow: var(--CTA-Shadow);
  transform: translateY(-2px);
  color: #0f172b;
}

.document-page__article {
  max-width: 900px;
  margin: 0 auto;
}

.legal-doc-page {
  background: #f8fafc;
  color: #0f172b;
  padding-bottom: 5rem;
}

.legal-doc-page__container {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
}

.legal-doc-page__article {
  margin-top: -2.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 43, 0.08);
}

.legal-doc-page__content {
  padding: clamp(1.5rem, 3vw, 2.75rem);
  display: grid;
  gap: 1rem;
}

.legal-doc-page__updated {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #475569;
  font-weight: 600;
}

.legal-doc-page__content h2,
.legal-doc-page__content h3,
.legal-doc-page__content h4 {
  margin-top: 1.4rem;
  color: #0f172b;
}

.legal-doc-page__content p,
.legal-doc-page__content li {
  color: #1e293b;
  line-height: 1.75;
}

.legal-doc-page__content ul,
.legal-doc-page__content ol {
  padding-left: 1.25rem;
}

.content-page__legal-assistance {
  padding: 1.25rem 0 0;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
}

.content-page__legal-assistance a {
  text-decoration: underline;
}

/* --- Reveal on Scroll Animations --- */
.has-reveal-js .reveal,
.has-reveal-js .reveal-group > * {
  opacity: 0;
  transform: translate3d(0, 2rem, 0);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.has-reveal-js .reveal-group > * {
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-revealed,
.reveal-group.is-revealed > * {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
}

/* Directional Variants */
.has-reveal-js .reveal--left {
  transform: translate3d(-2.25rem, 0, 0);
}

.has-reveal-js .reveal--right {
  transform: translate3d(2.25rem, 0, 0);
}

.has-reveal-js .reveal--up {
  transform: translate3d(0, 2.75rem, 0);
}

/* Group Delay */
.has-reveal-js .reveal-delay-1 { transition-delay: 0.12s; }
.has-reveal-js .reveal-delay-2 { transition-delay: 0.24s; }
.has-reveal-js .reveal-delay-3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .has-reveal-js .reveal,
  .has-reveal-js .reveal-group > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.document-page__content,
.single-post-page__content {
  display: grid;
  gap: 1rem;
}

.document-page__content h2,
.document-page__content h3,
.document-page__content h4,
.single-post-page__content h2,
.single-post-page__content h3,
.single-post-page__content h4 {
  margin-top: 1.5rem;
}

.document-page__content ul,
.document-page__content ol,
.single-post-page__content ul,
.single-post-page__content ol {
  padding-left: 1.25rem;
}

.empty-state {
  padding: 6rem 0;
}

.empty-state__container {
  max-width: 40rem;
  display: grid;
  gap: 1rem;
}

@media (max-width: 900px) {
  .content-page-layout__container,
  .contact-page__inner {
    grid-template-columns: 1fr;
  }
}
