@import url("./base.css");

.tv-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--tv-header-height);
  border-bottom: 1px solid var(--tv-border-soft);
  background: rgba(244, 239, 228, 0.94);
  background: color-mix(in srgb, var(--tv-surface-page) 92%, transparent);
  backdrop-filter: blur(18px);
}

.tv-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--tv-space-32);
  min-height: var(--tv-header-height);
}

.tv-brand {
  display: inline-flex;
  flex-direction: column;
  gap: var(--tv-space-2);
  color: var(--tv-text-primary);
  font-family: var(--tv-font-display);
  text-decoration: none;
}

.tv-brand__name {
  font-size: var(--tv-text-base);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
}

.tv-brand__sub {
  color: var(--tv-text-secondary);
  font-size: var(--tv-text-xs);
  font-weight: 500;
  line-height: 1.15;
}

.tv-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--tv-space-20), 3vw, var(--tv-space-40));
}

.tv-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--tv-text-primary);
  font-family: var(--tv-font-display);
  font-size: var(--tv-text-sm);
  font-weight: 600;
  line-height: var(--tv-leading-ui);
  text-decoration: none;
}

.tv-nav__link--mobile-only {
  display: none;
}

.tv-nav__link::after {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  height: 2px;
  background: var(--tv-action-primary);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--tv-motion-standard) var(--tv-ease-standard);
}

.tv-nav__link:hover::after,
.tv-nav__link[aria-current="page"]::after,
.tv-nav__link[aria-current="true"]::after {
  transform: scaleX(1);
}

.tv-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--tv-space-12);
}

.tv-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--tv-radius-pill);
  background: transparent;
  color: var(--tv-text-primary);
}

.tv-menu-toggle__icon {
  position: relative;
  width: 24px;
  height: 16px;
}

.tv-menu-toggle__icon::before,
.tv-menu-toggle__icon::after,
.tv-menu-toggle__bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: var(--tv-radius-pill);
  background: currentColor;
  content: "";
  transition: transform var(--tv-motion-standard) var(--tv-ease-standard), opacity var(--tv-motion-fast) var(--tv-ease-standard);
}

.tv-menu-toggle__icon::before {
  top: 0;
}

.tv-menu-toggle__bar {
  top: 7px;
}

.tv-menu-toggle__icon::after {
  bottom: 0;
}

.tv-menu-toggle[aria-expanded="true"] .tv-menu-toggle__icon::before {
  transform: translateY(7px) rotate(45deg);
}

.tv-menu-toggle[aria-expanded="true"] .tv-menu-toggle__bar {
  opacity: 0;
}

.tv-menu-toggle[aria-expanded="true"] .tv-menu-toggle__icon::after {
  transform: translateY(-7px) rotate(-45deg);
}

.tv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--tv-space-24);
  border: 1px solid transparent;
  border-radius: var(--tv-radius-pill);
  font-family: var(--tv-font-display);
  font-size: var(--tv-text-sm);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--tv-motion-standard) var(--tv-ease-standard), border-color var(--tv-motion-standard) var(--tv-ease-standard), color var(--tv-motion-standard) var(--tv-ease-standard), transform var(--tv-motion-standard) var(--tv-ease-standard), box-shadow var(--tv-motion-standard) var(--tv-ease-standard);
}

.tv-button--lg {
  min-height: 48px;
  padding-inline: var(--tv-space-32);
  font-size: var(--tv-text-base);
}

.tv-button--primary {
  background: var(--tv-action-primary);
  color: var(--tv-text-on-dark);
  box-shadow: var(--tv-shadow-subtle);
}

.tv-button--primary:hover {
  background: var(--tv-action-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--tv-shadow-card);
}

.tv-button--primary:active {
  background: var(--tv-action-primary-pressed);
  transform: translateY(0);
  box-shadow: var(--tv-shadow-subtle);
}

.tv-button--secondary {
  border-color: var(--tv-border-medium);
  background: transparent;
  color: var(--tv-action-primary);
}

.tv-button--secondary:hover {
  border-color: var(--tv-action-primary);
  background: var(--tv-action-secondary-hover);
}

.tv-button--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--tv-action-primary);
}

.tv-button--ghost:hover {
  background: var(--tv-action-secondary-hover);
}

.tv-button--destructive {
  background: var(--tv-color-error);
  color: #fff;
}

.tv-button--destructive:hover {
  background: var(--tv-color-error-dark);
}

.tv-button:disabled,
.tv-button[aria-disabled="true"] {
  border-color: transparent;
  background: var(--tv-action-disabled);
  color: var(--tv-text-subtle);
  box-shadow: none;
  transform: none;
}

.tv-card {
  border: 1px solid var(--tv-border-soft);
  border-radius: var(--tv-radius-lg);
  background: var(--tv-surface-card);
  box-shadow: var(--tv-shadow-subtle);
}

.tv-card--padded {
  padding: clamp(var(--tv-space-24), 4vw, var(--tv-space-40));
}

.tv-card--elevated {
  box-shadow: var(--tv-shadow-card);
}

.tv-card--dark {
  border-color: var(--tv-border-on-dark);
  background: var(--tv-surface-dark);
  color: var(--tv-text-on-dark);
}

.tv-card__eyebrow {
  margin-block-end: var(--tv-space-12);
  color: var(--tv-color-verdant-600);
  font-family: var(--tv-font-display);
  font-size: var(--tv-text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tv-card__title {
  margin-block-end: var(--tv-space-12);
  color: inherit;
  font-family: var(--tv-font-display);
  font-size: var(--tv-text-lg);
  font-weight: 600;
  line-height: var(--tv-leading-heading);
}

.tv-card__body {
  color: var(--tv-text-secondary);
  font-size: var(--tv-text-base);
  line-height: var(--tv-leading-body);
}

.tv-card--dark .tv-card__body {
  color: var(--tv-text-on-dark-muted);
}

.tv-card--dark .tv-card__eyebrow {
  color: var(--tv-color-forest-300);
}

.tv-form-card {
  border: 1px solid var(--tv-border-soft);
  border-radius: var(--tv-radius-xl);
  background: var(--tv-surface-card);
  box-shadow: var(--tv-shadow-card);
  padding: clamp(var(--tv-space-24), 4vw, var(--tv-space-40));
}

.tv-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--tv-space-20);
}

.tv-field {
  display: grid;
  gap: var(--tv-space-8);
}

.tv-field--full {
  grid-column: 1 / -1;
}

.tv-label {
  color: var(--tv-text-primary);
  font-family: var(--tv-font-display);
  font-size: var(--tv-text-sm);
  font-weight: 600;
  line-height: var(--tv-leading-ui);
}

.tv-input,
.tv-select,
.tv-textarea {
  width: 100%;
  border: 1px solid var(--tv-border-medium);
  border-radius: var(--tv-radius-md);
  background: #fff;
  color: var(--tv-text-primary);
  font-family: var(--tv-font-body);
  font-size: var(--tv-text-base);
  line-height: var(--tv-leading-ui);
  transition: border-color var(--tv-motion-standard) var(--tv-ease-standard), box-shadow var(--tv-motion-standard) var(--tv-ease-standard), background-color var(--tv-motion-standard) var(--tv-ease-standard);
}

.tv-input,
.tv-select {
  min-height: 48px;
  padding: 0 var(--tv-space-16);
}

.tv-textarea {
  min-height: 128px;
  padding: var(--tv-space-16);
  resize: vertical;
}

.tv-input::placeholder,
.tv-textarea::placeholder {
  color: var(--tv-text-subtle);
}

.tv-input:hover,
.tv-select:hover,
.tv-textarea:hover {
  border-color: var(--tv-border-strong);
}

.tv-input:focus,
.tv-select:focus,
.tv-textarea:focus {
  border-color: var(--tv-action-primary);
  box-shadow: 0 0 0 4px rgba(119, 184, 148, 0.28);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tv-focus-ring) 28%, transparent);
}

.tv-field__hint,
.tv-field__error {
  font-size: var(--tv-text-sm);
  line-height: var(--tv-leading-ui);
}

.tv-field__hint {
  color: var(--tv-text-muted);
}

.tv-field__error {
  color: var(--tv-color-error-dark);
}

.tv-faq {
  border: 1px solid var(--tv-border-soft);
  border-radius: var(--tv-radius-lg);
  overflow: hidden;
  background: var(--tv-surface-card);
}

.tv-faq__item + .tv-faq__item {
  border-top: 1px solid var(--tv-border-soft);
}

.tv-faq__button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--tv-space-20);
  width: 100%;
  min-height: 64px;
  padding: var(--tv-space-20) var(--tv-space-24);
  border: 0;
  background: transparent;
  color: var(--tv-text-primary);
  font-family: var(--tv-font-display);
  font-size: var(--tv-text-base);
  font-weight: 600;
  line-height: var(--tv-leading-ui);
  text-align: left;
}

.tv-faq__icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--tv-action-primary);
  transition: transform var(--tv-motion-standard) var(--tv-ease-standard);
}

.tv-faq__button[aria-expanded="true"] .tv-faq__icon {
  transform: rotate(180deg);
}

.tv-faq__panel {
  display: none;
  padding: 0 var(--tv-space-24) var(--tv-space-24);
  color: var(--tv-text-secondary);
}

.tv-faq__panel[data-open="true"] {
  display: block;
}

.tv-footer {
  background: var(--tv-surface-dark);
  color: var(--tv-text-on-dark);
}

.tv-footer .tv-brand {
  color: var(--tv-text-on-dark);
}

.tv-footer .tv-brand__sub {
  color: var(--tv-text-on-dark-muted);
}

.tv-footer__inner {
  display: grid;
  grid-template-columns: minmax(14rem, 1.4fr) repeat(4, minmax(9rem, 1fr));
  gap: clamp(var(--tv-space-32), 5vw, var(--tv-space-80));
  padding-block: clamp(var(--tv-space-64), 8vw, var(--tv-space-96));
}

.tv-footer__heading {
  margin-block-end: var(--tv-space-20);
  color: var(--tv-text-on-dark);
  font-family: var(--tv-font-display);
  font-size: var(--tv-text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tv-footer__list {
  display: grid;
  gap: var(--tv-space-12);
  padding: 0;
  margin: 0;
  list-style: none;
}

.tv-footer__link {
  color: var(--tv-text-on-dark-muted);
  font-family: var(--tv-font-body);
  font-size: var(--tv-text-sm);
  text-decoration: none;
}

.tv-footer__link:hover {
  color: var(--tv-text-on-dark);
  text-decoration: underline;
}

.tv-footer__meta {
  border-top: 1px solid var(--tv-border-on-dark);
  padding-block: var(--tv-space-32);
  color: var(--tv-text-on-dark-muted);
  font-size: var(--tv-text-sm);
}

@media (max-width: 1023px) {
  .tv-header__inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .tv-menu-toggle {
    display: inline-flex;
  }

  .tv-header__actions {
    display: none;
  }

  .tv-nav {
    position: fixed;
    inset: var(--tv-header-height) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - var(--tv-header-height));
    padding: var(--tv-space-16) var(--tv-container-pad) var(--tv-space-32);
    border-bottom: 1px solid var(--tv-border-soft);
    background: var(--tv-surface-page);
    box-shadow: var(--tv-shadow-card);
    overflow-y: auto;
  }

  .tv-nav[data-open="true"] {
    display: flex;
  }

  .tv-nav__link {
    display: inline-flex;
    min-height: 52px;
    border-bottom: 1px solid var(--tv-border-soft);
  }

  .tv-nav__link::after {
    display: none;
  }

  .tv-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tv-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .tv-form-grid {
    grid-template-columns: 1fr;
  }

  .tv-button {
    width: 100%;
  }

  .tv-footer__inner {
    grid-template-columns: 1fr;
  }
}

/* Foundation polish patch: active nav, FAQ motion and footer finish. */
.tv-nav__link[aria-current="location"]::after {
  transform: scaleX(1);
}

.tv-nav__link[aria-current="location"] {
  color: var(--tv-action-primary);
}

.tv-faq__button {
  transition: background-color var(--tv-motion-standard) var(--tv-ease-standard), color var(--tv-motion-standard) var(--tv-ease-standard);
}

.tv-faq__button:hover {
  background: var(--tv-surface-page-soft);
}

.tv-faq__icon {
  position: relative;
  width: 26px;
  height: 26px;
  border: 1px solid var(--tv-border-medium);
  border-radius: var(--tv-radius-pill);
  background: var(--tv-surface-page);
}

.tv-faq__icon::before,
.tv-faq__icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  border-radius: var(--tv-radius-pill);
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
  transition: transform var(--tv-motion-standard) var(--tv-ease-standard);
}

.tv-faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.tv-faq__button[aria-expanded="true"] .tv-faq__icon {
  border-color: rgba(30, 96, 73, 0.28);
  background: var(--tv-action-secondary-hover);
  transform: none;
}

.tv-faq__button[aria-expanded="true"] .tv-faq__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.tv-faq__panel {
  display: block;
  max-height: 0;
  overflow: hidden;
  padding: 0 var(--tv-space-24);
  opacity: 0;
  transition: max-height var(--tv-motion-slow) var(--tv-ease-standard), opacity var(--tv-motion-standard) var(--tv-ease-standard), padding-bottom var(--tv-motion-standard) var(--tv-ease-standard);
}

.tv-faq__panel[data-open="true"] {
  max-height: 24rem;
  padding-bottom: var(--tv-space-24);
  opacity: 1;
}

.tv-footer__inner {
  align-items: start;
}

.tv-footer__brand {
  max-width: 19rem;
}

.tv-footer__brand .tv-footer__link {
  display: block;
  margin: 0 0 var(--tv-space-8);
}

.tv-footer__heading {
  margin-block-end: var(--tv-space-16);
}

.tv-footer__list {
  gap: var(--tv-space-10);
}

.tv-footer__link {
  line-height: 1.55;
}

.tv-footer__meta {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: var(--tv-space-40);
}

@media (max-width: 1023px) {
  .tv-nav__link[aria-current="location"] {
    color: var(--tv-action-primary);
  }

  .tv-footer__meta {
    grid-template-columns: 1fr;
    gap: var(--tv-space-16);
  }
}

@media (max-width: 767px) {
  .tv-faq__button {
    gap: var(--tv-space-16);
    padding-inline: var(--tv-space-20);
  }

  .tv-faq__panel {
    padding-inline: var(--tv-space-20);
  }

  .tv-footer__inner {
    gap: var(--tv-space-40);
    padding-block: var(--tv-space-64);
  }

  .tv-footer__brand {
    max-width: none;
    padding-bottom: var(--tv-space-8);
  }

  .tv-footer nav {
    padding-top: var(--tv-space-24);
    border-top: 1px solid var(--tv-border-on-dark);
  }

  .tv-footer__meta {
    padding-block: var(--tv-space-28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tv-faq__button,
  .tv-faq__icon,
  .tv-faq__icon::before,
  .tv-faq__icon::after,
  .tv-faq__panel {
    transition-duration: 0.01ms !important;
  }
}
/* Final homepage benchmark footer rhythm: compact mobile grouping without changing content. */
@media (max-width: 767px) {
  .tv-footer__inner {
    gap: var(--tv-space-28);
    padding-block: var(--tv-space-48);
  }

  .tv-footer__brand {
    padding-bottom: 0;
  }

  .tv-footer nav {
    padding-top: var(--tv-space-18);
  }

  .tv-footer__heading {
    margin-block-end: var(--tv-space-10);
  }

  .tv-footer__list {
    gap: var(--tv-space-6);
  }

  .tv-footer__link {
    line-height: 1.42;
  }

  .tv-footer__meta {
    padding-block: var(--tv-space-20);
  }
}
