/* ═══════════════════════════════════════════════════════════════════════════
   TaskCatalyst SDK v1 — tc.css
   Component styles. All colors via CSS custom properties from :root / [data-theme].
   CSS vars are injected inline from the DB by TC_SiteDB::cssVars() in layout.php.
   ═══════════════════════════════════════════════════════════════════════════ */


/* ─── Buttons ────────────────────────────────────────────────────────────── */

.tc-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  border-radius: var(--tc-radius);
  font-family: var(--tc-font-body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}

.tc-btn:hover  { opacity: .85; transform: translateY(-1px); }
.tc-btn:active { transform: translateY(0); opacity: .9; }

.tc-btn:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 3px;
}

.tc-btn--primary {
  background: var(--tc-primary);
  color: #fff;
}

.tc-btn--outline {
  background: transparent;
  border-color: var(--tc-primary);
  color: var(--tc-primary);
}

.tc-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--tc-primary);
}

@media (prefers-reduced-motion: reduce) {
  .tc-btn { transition: none; }
  .tc-btn:hover { transform: none; }
}


/* ─── Navbar ─────────────────────────────────────────────────────────────── */

.tc-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--tc-bg);
  border-bottom: 1px solid var(--tc-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tc-navbar__inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 1.5rem;
}

.tc-navbar__brand {
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.tc-navbar__logo {
  height: 38px;
  width: auto;
  display: block;
}

.tc-navbar__name {
  font-family: var(--tc-font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tc-text);
  letter-spacing: -.015em;
}

.tc-navbar__nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.tc-navbar__nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: .125rem;
}

.tc-navbar__nav a {
  display: block;
  padding: .45rem .875rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--tc-muted);
  text-decoration: none;
  border-radius: calc(var(--tc-radius) * 0.75);
  transition: color .15s ease, background .15s ease;
}

.tc-navbar__nav a:hover {
  color: var(--tc-text);
  background: var(--tc-surface);
}

.tc-navbar__nav a[aria-current="page"] {
  color: var(--tc-text);
  background: var(--tc-surface);
  font-weight: 600;
}

.tc-navbar__nav a:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}

/* Hamburger */
.tc-navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
  border-radius: var(--tc-radius);
  -webkit-tap-highlight-color: transparent;
}

.tc-navbar__hamburger:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}

.tc-navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tc-text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .15s ease;
  transform-origin: center;
}

.tc-navbar__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.tc-navbar__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.tc-navbar__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel */
.tc-mobile-nav {
  background: var(--tc-surface);
  border-bottom: 1px solid var(--tc-border);
}

.tc-mobile-nav ul {
  list-style: none;
  padding: .5rem 0;
}

.tc-mobile-nav a {
  display: block;
  padding: .8rem 1.5rem;
  color: var(--tc-text);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}

.tc-mobile-nav a:hover {
  background: var(--tc-bg);
  color: var(--tc-primary);
}

.tc-mobile-nav a:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: -2px;
}

@media (max-width: 768px) {
  .tc-navbar__nav       { display: none; }
  .tc-navbar__hamburger { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .tc-navbar__hamburger span { transition: none; }
}


/* ─── Hero ───────────────────────────────────────────────────────────────── */

.tc-hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--tc-surface);
  background-image: var(--hero-bg, none);
  background-size: cover;
  background-position: center;
}

/* Dark overlay when bg image is set */
.tc-hero[style*="--hero-bg"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, var(--hero-overlay, .5));
  z-index: 0;
}

/* Heights */
.tc-hero--full   { min-height: 100svh; }
.tc-hero--large  { min-height: 70vh; }
.tc-hero--medium { min-height: 45vh; }

/* Content area */
.tc-hero__content {
  position: relative;
  z-index: 1;
  padding-block: 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tc-hero--center .tc-hero__content { align-items: center; text-align: center; }
.tc-hero--right  .tc-hero__content { align-items: flex-end; text-align: right; }
.tc-hero--left   .tc-hero__content { align-items: flex-start; text-align: left; }

/* Text: white on image hero */
.tc-hero[style*="--hero-bg"] .tc-hero__headline {
  color: #fff;
}
.tc-hero[style*="--hero-bg"] .tc-hero__subheadline {
  color: rgba(255, 255, 255, .82);
}

/* Typography */
.tc-hero__headline {
  font-family: var(--tc-font-heading);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--tc-text);
  text-wrap: balance;
  max-width: 18ch;
  letter-spacing: -.02em;
}

.tc-hero__subheadline {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--tc-muted);
  max-width: 52ch;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .tc-hero--full { min-height: 85svh; }
  .tc-hero__content { padding-block: 3.5rem; }
}


/* ─── Heading ────────────────────────────────────────────────────────────── */

.tc-heading {
  padding: 3rem 0 1rem;
}

.tc-heading .tc-container {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.tc-heading--center .tc-container { align-items: center; text-align: center; }
.tc-heading--right  .tc-container { align-items: flex-end;  text-align: right; }
.tc-heading--left   .tc-container { align-items: flex-start; text-align: left; }

.tc-heading__text {
  font-family: var(--tc-font-heading);
  color: var(--tc-text);
  line-height: 1.2;
  text-wrap: balance;
  letter-spacing: -.01em;
}

.tc-heading--xl .tc-heading__text { font-size: clamp(1.75rem, 4vw, 3rem);    font-weight: 700; }
.tc-heading--lg .tc-heading__text { font-size: clamp(1.4rem, 3vw, 2.25rem);  font-weight: 700; }
.tc-heading--md .tc-heading__text { font-size: clamp(1.15rem, 2.2vw, 1.7rem); font-weight: 600; }
.tc-heading--sm .tc-heading__text { font-size: 1.1rem;                         font-weight: 600; }

.tc-heading__subtext {
  color: var(--tc-muted);
  font-size: 1.05rem;
  max-width: 55ch;
  line-height: 1.65;
}


/* ─── Paragraph ──────────────────────────────────────────────────────────── */

.tc-paragraph {
  padding: .875rem 0;
}

.tc-paragraph--center .tc-container { text-align: center; }
.tc-paragraph--right  .tc-container { text-align: right; }

.tc-paragraph p {
  color: var(--tc-text);
  line-height: 1.8;
}

.tc-paragraph--sm p { font-size: .9rem; }
.tc-paragraph--md p { font-size: 1rem; }
.tc-paragraph--lg p { font-size: 1.1rem; }

.tc-paragraph--narrow  p { max-width: 45ch; }
.tc-paragraph--normal  p { max-width: 65ch; }
.tc-paragraph--wide    p { max-width: 85ch; }

.tc-paragraph--center p { margin-inline: auto; }
.tc-paragraph--right  p { margin-inline-start: auto; }


/* ─── Divider ────────────────────────────────────────────────────────────── */

.tc-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.tc-divider--sm { padding-block: .875rem; }
.tc-divider--md { padding-block: 1.75rem; }
.tc-divider--lg { padding-block: 3.5rem; }

/* Line */
.tc-divider--line {
  padding-inline: 1.25rem;
}
.tc-divider--line::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: var(--tc-border);
}

/* Dots */
.tc-divider--dots { gap: .6rem; }

.tc-divider--dots span {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tc-border);
}

/* Wave */
.tc-divider--wave {
  padding-block: 0;
  overflow: hidden;
}
.tc-divider--wave svg {
  width: 100%;
  display: block;
  flex-shrink: 0;
}
.tc-divider--wave.tc-divider--sm svg { height: 28px; }
.tc-divider--wave.tc-divider--md svg { height: 48px; }
.tc-divider--wave.tc-divider--lg svg { height: 72px; }

/* Space — pure whitespace, no decoration */
.tc-divider--space { padding-inline: 0; }
.tc-divider--space::after { display: none; }


/* ─── Section wrapper (optional utility) ─────────────────────────────────── */

.tc-section {
  padding-block: 3rem;
}

@media (min-width: 768px) {
  .tc-section { padding-block: 5rem; }
}


/* ─── Footer ─────────────────────────────────────────────────────────────── */

.tc-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--tc-border);
  background: var(--tc-surface);
}

.tc-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2.5rem;
  padding-block: 2.75rem;
  align-items: start;
}

.tc-footer__brand {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.tc-footer__name {
  font-family: var(--tc-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tc-text);
  letter-spacing: -.01em;
}

.tc-footer__brand address {
  font-style: normal;
  font-size: .875rem;
  color: var(--tc-muted);
  line-height: 1.55;
}

.tc-footer__contact {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
}

.tc-footer__contact a {
  font-size: .875rem;
  color: var(--tc-muted);
  text-decoration: none;
  transition: color .15s ease;
}

.tc-footer__contact a:hover { color: var(--tc-primary); }

.tc-footer__social {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .625rem;
}

.tc-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--tc-radius);
  border: 1px solid var(--tc-border);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--tc-muted);
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.tc-footer__social a:hover {
  border-color: var(--tc-primary);
  color: var(--tc-primary);
  background: transparent;
}

.tc-footer__social a:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}

.tc-footer__copy {
  grid-column: 1;
  grid-row: 2;
  font-size: .8rem;
  color: var(--tc-muted);
  align-self: end;
  padding-top: .5rem;
}

@media (max-width: 640px) {
  .tc-footer__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .tc-footer__contact {
    grid-column: 1;
    grid-row: 2;
    align-items: flex-start;
  }
  .tc-footer__social {
    grid-column: 1;
    grid-row: 3;
    justify-content: flex-start;
  }
  .tc-footer__copy {
    grid-row: 4;
    padding-top: .75rem;
  }
}


/* ─── Scroll-reveal utility ──────────────────────────────────────────────── */

.tc-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}

.tc-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .tc-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
