/* Vice / Dark / Light.
   No data-fh-theme attribute means the current site (Light). These rules
   do not match, so visitors who never click see the same page as before.
   Light in the switch clears the attribute. */

.fh-theme {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  color: #111;
  background: transparent;
  border: 0;
}
.exp-nav .fh-end-tools {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.15rem;
}
@media (min-width: 901px) {
  html.fh-house-light .exp-nav .fh-end-tools {
    position: absolute;
    right: max(0.4rem, env(safe-area-inset-right));
    top: 0;
    bottom: 0;
    height: fit-content;
    margin: auto 0;
    z-index: 9;
  }
  html.fh-house-light .exp-nav .fh-end-tools .fh-quote-btn {
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    margin: 0;
    flex: 0 0 44px;
  }
  html.fh-house-light body .exp-nav .end {
    padding-right: 11.6rem;
    gap: 0.4rem;
    justify-content: flex-end;
  }
  html.fh-house-light .exp-nav .end > a,
  html.fh-house-light .exp-nav .end .nav-dd {
    letter-spacing: 0.04em;
  }
  html.fh-house-light .exp-nav .fh-theme-btn {
    min-height: 28px;
    padding: 0 0.42rem;
    gap: 3px;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }
  html.fh-house-light .exp-nav .fh-theme-btn svg {
    width: 12px;
    height: 12px;
  }
}
@media (min-width: 901px) and (max-width: 1240px) {
  html.fh-house-light body .exp-nav .end {
    padding-right: 11.5rem;
    gap: 0.6rem;
    justify-content: flex-end;
  }
  html.fh-house-light .exp-nav .fh-theme-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  html.fh-house-light .exp-nav .fh-theme-btn {
    width: 32px;
    padding: 0;
  }
}
.fh-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 32px;
  margin: 0;
  padding: 0 0.6rem;
  border: 1px solid rgba(17, 17, 17, 0.22);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: Inter, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 560;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.fh-theme-btn svg {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.fh-theme-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
html:not([data-fh-theme]) .fh-theme-btn[data-fh-theme-pick="light"] {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Landing header: switch sits on the right, just before the menu button. */
header.nav {
  flex-wrap: nowrap;
  align-items: center;
}
header.nav .nav-links {
  margin-left: auto;
}
header.nav .fh-theme {
  flex: 0 0 auto;
  margin-left: 0.75rem;
  background: transparent;
  color: #f4f2ec;
  border: 0;
  padding: 0;
}
header.nav .fh-theme-btn {
  border-color: rgba(255, 255, 255, 0.38);
  color: #f4f2ec;
}
html:not([data-fh-theme]) header.nav .fh-theme-btn[data-fh-theme-pick="light"] {
  background: #f4f2ec;
  color: #141518;
  border-color: #f4f2ec;
}

html[data-fh-theme="dark"] {
  color-scheme: dark;
  --t-bg: #12141a;
  --t-solid: #12141a;
  --t-surface: #1e232d;
  --t-ink: #f4f2ec;
  --t-muted: #c5cbd6;
  --t-accent: #e7ebf3;
  --t-accent-ink: #12141a;
  --t-line: #3d4452;
  --t-nav: #161920;
  --t-field: #1a1f29;
}
html[data-fh-theme="vice"] {
  color-scheme: dark;
  --t-bg: rgba(28, 6, 42, 0.78);
  --t-solid: #1a0b28;
  --t-surface: #2a1038;
  --t-ink: #fff6fb;
  --t-muted: #f3c6de;
  --t-accent: #67f0ff;
  --t-accent-ink: #140818;
  --t-line: rgba(103, 240, 255, 0.5);
  --t-nav: #1a0b28;
  --t-field: #24102f;
}
html[data-fh-theme="vice"]:not(.fh-studio-full) {
  min-height: 100%;
  background-color: #ff2e88;
  background-image: linear-gradient(
    155deg,
    #ff2e88 0%,
    #ff4ea8 14%,
    #d4268c 30%,
    #8a2d86 46%,
    #3a2a78 62%,
    #146888 78%,
    #1ad4d0 100%
  );
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

html[data-fh-theme="dark"] .exp-nav .logo-word,
html[data-fh-theme="vice"] .exp-nav .logo-word,
html[data-fh-theme="dark"] .loader-logo img,
html[data-fh-theme="vice"] .loader-logo img {
  filter: invert(1);
}

html[data-fh-theme] .exp-nav,
html[data-fh-theme] .exp-nav .top,
html[data-fh-theme] header.nav {
  background: var(--t-nav);
  color: var(--t-ink);
  border-color: var(--t-line);
}
html[data-fh-theme] .fh-theme,
html[data-fh-theme] .exp-nav .fh-theme,
html[data-fh-theme] header.nav .fh-theme {
  background: transparent;
  color: var(--t-ink);
  border: 0;
}
html[data-fh-theme] .exp-nav {
  box-shadow: none;
}
html[data-fh-theme] .exp-nav .top {
  border-bottom-color: var(--t-line);
}
html[data-fh-theme] .exp-nav .top nav a,
html[data-fh-theme] .exp-nav .end > a,
html[data-fh-theme] .exp-nav .logo,
html[data-fh-theme] .exp-nav .nav-dd-more,
html[data-fh-theme] .exp-nav .nav-dd-panel a,
html[data-fh-theme] .fh-quote-btn,
html[data-fh-theme] .exp-nav .nav-dd-panel .nav-dd-disabled {
  color: var(--t-ink);
}
html[data-fh-theme] .exp-nav .logo .logo-sub {
  color: var(--t-muted);
}
html[data-fh-theme] .exp-nav .top nav a:hover,
html[data-fh-theme] .exp-nav .end > a:hover,
html[data-fh-theme] .exp-nav .nav-dd-panel a:hover {
  color: var(--t-accent);
}
html[data-fh-theme] .exp-nav .burger span,
html[data-fh-theme] .exp-nav .has-rule::after {
  background: var(--t-ink);
}
html[data-fh-theme] .exp-nav .nav-dd-panel {
  background: var(--t-surface);
  border-color: var(--t-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
html[data-fh-theme] .fh-theme-btn {
  background: transparent;
  color: var(--t-ink);
  border-color: var(--t-line);
}
html[data-fh-theme="dark"] .fh-theme-btn[data-fh-theme-pick="dark"],
html[data-fh-theme="vice"] .fh-theme-btn[data-fh-theme-pick="vice"] {
  background: var(--t-accent);
  color: var(--t-accent-ink);
  border-color: var(--t-accent);
}
@media (max-width: 900px) {
  html[data-fh-theme] .exp-nav .top nav {
    background: var(--t-nav);
    color: var(--t-ink);
  }
  html[data-fh-theme] .exp-nav .top nav a,
  html[data-fh-theme] .exp-nav .nav-drawer-resources {
    color: var(--t-ink);
  }
  html[data-fh-theme] .exp-nav .nav-scrim {
    background: rgba(0, 0, 0, 0.55);
  }
}

/* Page surfaces. Studio pages keep their own canvas; only the nav themes. */
html[data-fh-theme="dark"]:not(.fh-studio-full) {
  background: var(--t-bg);
  color: var(--t-ink);
}
html[data-fh-theme]:not(.fh-studio-full) body,
html[data-fh-theme]:not(.fh-studio-full) body.site-page,
html[data-fh-theme]:not(.fh-studio-full) body.day-mode {
  background: var(--t-bg);
  color: var(--t-ink);
}
html[data-fh-theme="vice"]:not(.fh-studio-full) body,
html[data-fh-theme="vice"]:not(.fh-studio-full) body.site-page,
html[data-fh-theme="vice"]:not(.fh-studio-full) body.day-mode {
  background: transparent;
}
html[data-fh-theme]:not(.fh-studio-full) :is(
  .section-dark,
  .section-gray,
  .section-light,
  .contact-section,
  .footer,
  .house-open,
  .tools-trade,
  .page-pad,
  .loader,
  .wrap,
  .lb-shell,
  .pj-hero
) {
  background: var(--t-bg);
  color: var(--t-ink);
}
html[data-fh-theme]:not(.fh-studio-full) .loader-line,
html[data-fh-theme]:not(.fh-studio-full) .loader-word {
  color: var(--t-muted);
}
html[data-fh-theme]:not(.fh-studio-full) :is(
  .home-project-lead,
  .contact-right,
  .how-modal-panel,
  .how-card,
  .order-card,
  .order-example,
  .order-code-table,
  .tool-card,
  .cap-card,
  .quote-modal .modal
) {
  background: var(--t-surface);
  color: var(--t-ink);
  border-color: var(--t-line);
}
html[data-fh-theme]:not(.fh-studio-full) :is(
  .section-title,
  .contact-left h2,
  .contact-right h3,
  .home-project-lead-copy h3,
  .footer-col h4,
  .footer .nav-logo,
  .how-modal-close,
  .how-info-btn,
  .order-val,
  .insta-title,
  .insta-icon,
  .contact-detail-item .value,
  .contact-detail-item a,
  .testimonial-quote,
  .testimonial-author
) {
  color: var(--t-ink);
}
html[data-fh-theme]:not(.fh-studio-full) .how-info-btn,
html[data-fh-theme]:not(.fh-studio-full) .contact-left h2 .how-info-btn {
  color: var(--t-ink);
  border-color: var(--t-ink);
  background: transparent;
}
html[data-fh-theme]:not(.fh-studio-full) :is(
  .section-eyebrow,
  .section-desc,
  .order-lbl,
  .order-hint,
  .order-codes-head,
  .order-code-label,
  .order-code-explain,
  .contact-detail-item .label,
  .contact-left > p,
  .contact-right > p,
  .contact-left .section-eyebrow,
  .footer-brand p,
  .footer-col a,
  .footer-bottom,
  .footer-bottom p,
  .footer .nav-logo span,
  .home-project-lead-copy p,
  .testimonial-role,
  .form-group label,
  .contact-section .form-group label
) {
  color: var(--t-muted);
}
html[data-fh-theme]:not(.fh-studio-full) .order-code-explain a,
html[data-fh-theme]:not(.fh-studio-full) .footer-col a:hover,
html[data-fh-theme]:not(.fh-studio-full) .contact-detail-item a:hover {
  color: var(--t-accent);
}
html[data-fh-theme]:not(.fh-studio-full) .footer,
html[data-fh-theme]:not(.fh-studio-full) body.day-mode .footer,
html[data-fh-theme]:not(.fh-studio-full) .footer-bottom,
html[data-fh-theme]:not(.fh-studio-full) .contact-detail-item {
  border-color: var(--t-line);
}
html[data-fh-theme]:not(.fh-studio-full) :is(
  .form-submit,
  .btn-primary,
  .footer-signup button,
  #ordering.four-fields .order-actions .btn-primary,
  #architecture .home-project-lead-copy a
) {
  background: var(--t-accent);
  color: var(--t-accent-ink);
  -webkit-text-fill-color: var(--t-accent-ink);
  border-color: var(--t-accent);
}
html[data-fh-theme]:not(.fh-studio-full) :is(
  .btn-outline,
  #ordering.four-fields .order-actions .btn-outline,
  .order-example
) {
  background: transparent;
  color: var(--t-ink);
  -webkit-text-fill-color: var(--t-ink);
  border-color: var(--t-line);
}
html[data-fh-theme]:not(.fh-studio-full) :is(
  .form-group input,
  .form-group textarea,
  .form-group select,
  .contact-section .form-group input,
  .contact-section .form-group textarea,
  .contact-section .form-group select,
  .footer-signup input,
  .fld,
  .nav-drawer-search input,
  input[type="search"],
  input[type="email"],
  input[type="text"],
  input[type="tel"],
  textarea,
  select
) {
  background: var(--t-field);
  color: var(--t-ink);
  border-color: var(--t-line);
}
html[data-fh-theme]:not(.fh-studio-full) :is(
  .form-group input,
  .form-group textarea,
  .contact-section .form-group input,
  .contact-section .form-group textarea,
  .footer-signup input,
  input,
  textarea
)::placeholder {
  color: var(--t-muted);
  opacity: 1;
}
html[data-fh-theme]:not(.fh-studio-full) .contact-section .form-group select:invalid,
html[data-fh-theme]:not(.fh-studio-full) .contact-section .form-group select option {
  color: var(--t-ink);
}
html[data-fh-theme]:not(.fh-studio-full) :is(input, textarea, select):focus-visible {
  outline: 2px solid var(--t-accent);
  outline-offset: 1px;
}
html[data-fh-theme]:not(.fh-studio-full) #architecture .home-project-lead {
  background: var(--t-surface);
  color: var(--t-ink);
}
html[data-fh-theme]:not(.fh-studio-full) #architecture .home-project-lead-copy h3 {
  color: var(--t-ink);
}
html[data-fh-theme]:not(.fh-studio-full) #architecture .home-project-lead-copy p {
  color: var(--t-muted);
}
html[data-fh-theme]:not(.fh-studio-full) #architecture .home-project-more {
  color: var(--t-accent);
  -webkit-text-fill-color: var(--t-accent);
}

/* GTA VI countdown card. Self-colored so it stays readable in every mode.
   The poster frame matches the file's aspect ratio. object-fit: cover never stretches it. */
.gta-count-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 1rem max(12px, env(safe-area-inset-right)) 0.35rem max(12px, env(safe-area-inset-left));
}
.gta-count {
  display: flex;
  align-items: center;
  gap: 0;
  width: min(760px, 100%);
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(103, 240, 255, 0.55);
  background: #140818;
  color: #fff7fb;
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(28, 6, 40, 0.28);
}
.gta-count:hover {
  color: #fff7fb;
}
.gta-count:focus-visible {
  outline: 2px solid #67f0ff;
  outline-offset: 3px;
}
.gta-count-art {
  flex: 0 0 auto;
  width: 210px;
  max-width: 42%;
  aspect-ratio: 671 / 1200;
  overflow: hidden;
  background: #140818;
}
.gta-count-art img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}
.gta-count-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
  padding: 1rem 1.15rem 1.1rem;
  box-sizing: border-box;
}
.gta-count-kicker {
  font-family: Inter, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff7fb;
}
.gta-count-units {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
.gta-count-unit {
  min-width: 0;
  text-align: center;
}
.gta-count-unit b {
  display: block;
  font-family: Inter, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.05rem, 2.4vw, 1.65rem);
  font-weight: 560;
  letter-spacing: 0;
  line-height: 1.1;
  color: #67f0ff;
}
.gta-count-unit i {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-family: Inter, Helvetica, sans-serif;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f6d5ea;
}
.gta-count-done {
  margin: 0;
  font-family: Inter, Helvetica, sans-serif;
  font-size: 1.35rem;
  font-weight: 560;
  letter-spacing: 0.04em;
  color: #67f0ff;
}
.gta-count-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 720px) {
  .gta-count {
    flex-direction: column;
    align-items: stretch;
  }
  .gta-count-art {
    width: min(210px, 58vw);
    max-width: 210px;
    align-self: center;
    margin-top: 12px;
    border-radius: 12px;
  }
  .gta-count-copy {
    width: 100%;
    padding: 0.9rem 0.85rem 1rem;
  }
  .gta-count-kicker {
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gta-count:hover { transform: none; }
}

/* Phone: compact icon switch on the right, beside the menu button. */
@media (max-width: 900px) {
  html.fh-house-light .exp-nav .top {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  html.fh-house-light .exp-nav .logo {
    grid-column: 1;
    justify-self: start;
    --fh-logo-w: min(9rem, 40vw);
    width: min(var(--fh-logo-w), calc(100vw - 11.6rem));
    min-width: 0;
    max-width: calc(100vw - 11.6rem);
    padding-left: 0.2rem;
  }
  html.fh-house-light .exp-nav .end {
    grid-column: 2;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0 max(0.15rem, env(safe-area-inset-right)) 0 0;
    gap: 0;
    justify-content: flex-end;
    overflow: visible;
  }
  html.fh-house-light .exp-nav .fh-end-tools {
    display: flex;
    align-items: center;
    gap: 0;
  }
  html.fh-house-light .exp-nav .fh-theme {
    gap: 3px;
    padding: 0;
  }
  html.fh-house-light .exp-nav .fh-theme-btn {
    width: 32px;
    min-height: 32px;
    padding: 0;
    gap: 0;
  }
  html.fh-house-light .exp-nav .fh-theme-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  html.fh-house-light .exp-nav .fh-end-tools .fh-quote-btn {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    right: auto;
    top: auto;
    bottom: auto;
  }
  html.fh-house-light .exp-nav .burger {
    flex: 0 0 40px;
    width: 40px;
  }
  header.nav .fh-theme-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  header.nav .fh-theme-btn {
    width: 32px;
    padding: 0;
  }
}

/* Vice: bold sunset behind every section. Light and Dark are untouched. */
html[data-fh-theme="vice"]:not(.fh-studio-full) :is(
  .section,
  .section-dark,
  .section-gray,
  .section-light,
  .contact-section,
  .footer,
  .tools-trade,
  .page-pad,
  .wrap,
  .lb-shell,
  .pj-hero,
  .loader
),
html[data-fh-theme="vice"]:not(.fh-studio-full) body.day-mode :is(
  .section-dark,
  .section-gray,
  .section-light,
  .footer,
  .contact-section
) {
  background-color: rgba(16, 2, 24, 0.38) !important;
  color: #fff6fb;
}
html[data-fh-theme="vice"]:not(.fh-studio-full) :is(.house-open, .house-hero) {
  background-color: transparent !important;
  background-image: none;
}
html[data-fh-theme="vice"]:not(.fh-studio-full) .exp-nav,
html[data-fh-theme="vice"]:not(.fh-studio-full) .exp-nav .top,
html[data-fh-theme="vice"]:not(.fh-studio-full) header.nav {
  background: rgba(28, 4, 36, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
html[data-fh-theme="vice"]:not(.fh-studio-full) :is(
  .contact-right,
  .home-project-lead,
  #architecture .home-project-lead,
  .how-card,
  .how-modal-panel,
  .order-card,
  .order-example,
  .order-code-table,
  .tool-card,
  .cap-card,
  .gta-count,
  .form-group input,
  .form-group textarea,
  .form-group select,
  .contact-section .form-group input,
  .contact-section .form-group textarea,
  .contact-section .form-group select,
  .footer-signup input
) {
  background-color: rgba(22, 4, 32, 0.62);
  box-shadow:
    0 0 0 1px rgba(255, 46, 136, 0.55),
    0 0 22px rgba(255, 46, 136, 0.32);
}
html[data-fh-theme="vice"]:not(.fh-studio-full) :is(
  h1,
  h2,
  h3,
  .section-title,
  .contact-left h2,
  .contact-right h3,
  #architecture .home-project-lead-copy h3,
  .footer-col h4
) {
  text-shadow:
    0 0 10px rgba(255, 46, 136, 0.85),
    0 0 22px rgba(255, 80, 160, 0.45);
}
html[data-fh-theme="vice"]:not(.fh-studio-full) :is(
  .form-submit,
  .btn-primary,
  #architecture .home-project-lead-copy a,
  .footer-signup button
) {
  box-shadow:
    0 0 14px rgba(255, 46, 136, 0.7),
    0 0 28px rgba(26, 212, 208, 0.28);
}
html[data-fh-theme="vice"] .fh-theme-btn[data-fh-theme-pick="vice"] {
  box-shadow: 0 0 12px rgba(255, 46, 136, 0.75);
}
@media (max-width: 900px) {
  html[data-fh-theme="vice"] .exp-nav .top nav {
    background: rgba(22, 4, 32, 0.94);
  }
}
