/*
Theme Name: Enocoustic
Theme URI: https://www.enocoustic.com.sg
Description: Brand child theme for Enocoustic, built on Twenty Twenty-Five. Warm white and forest green, editorial layout.
Author: Enocoustic
Template: twentytwentyfive
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: enocoustic
*/

/* ---- Utilities ---- */
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1rem;
}
.has-inverse-background-color .eyebrow,
.wp-block-cover .eyebrow { opacity: 0.85; }

.mono { font-family: var(--wp--preset--font-family--mono); font-size: 0.875em; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--wp--preset--color--inverse);
  color: var(--wp--preset--color--inverse-foreground);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header a { color: inherit; text-decoration: none; }
.site-header .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--wp--preset--color--inverse);
  color: var(--wp--preset--color--inverse-foreground);
}
.site-header .wp-block-navigation-item__content { padding: 0.5rem 0.25rem; }
.site-header .wp-block-navigation__submenu-container {
  background: var(--wp--preset--color--inverse) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: var(--wp--preset--color--inverse-foreground) !important;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--wp--preset--color--inverse);
  color: var(--wp--preset--color--inverse-foreground);
}
.site-footer a { color: inherit; }
.site-footer .footer-note { opacity: 0.7; font-size: 0.8125rem; }

/* ---- Home hero carousel ---- */
.enoc-hero { position: relative; overflow: hidden; background: var(--wp--preset--color--inverse); color: var(--wp--preset--color--inverse-foreground); min-height: min(86vh, 820px); min-height: min(86svh, 820px); }
.enoc-hero__slides { position: absolute; inset: 0; }
.enoc-hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 700ms ease, visibility 0s linear 700ms; }
.enoc-hero__slide.is-active { opacity: 1; visibility: visible; transition: opacity 700ms ease, visibility 0s; }
.enoc-hero__slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.enoc-hero__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 18, 15, 0.78) 0%, rgba(10, 18, 15, 0.35) 45%, rgba(10, 18, 15, 0.1) 100%); }
.enoc-hero__copy { position: absolute; left: 0; right: 0; bottom: 0; max-width: 1320px; margin: 0 auto; padding: 0 clamp(1.125rem, 4vw, 4rem) clamp(5.5rem, 9vw, 7.5rem); }
.enoc-hero__title { margin: 0 0 1.25rem; font-size: var(--wp--preset--font-size--display); font-weight: 500; line-height: 0.98; letter-spacing: -0.035em; max-width: 14ch; color: inherit; }
.enoc-hero__body { font-size: var(--wp--preset--font-size--large); max-width: 46ch; margin: 0; opacity: 0.95; }
.enoc-hero__links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.enoc-btn { display: inline-block; padding: 0.9rem 1.5rem; border-radius: 2px; font-weight: 500; text-decoration: none; border: 1px solid transparent; }
.enoc-btn--light { background: var(--wp--preset--color--inverse-foreground); color: var(--wp--preset--color--inverse); }
.enoc-btn--ghost { border-color: rgba(248, 248, 245, 0.7); color: var(--wp--preset--color--inverse-foreground); }
.enoc-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
.enoc-hero__controls { position: absolute; z-index: 3; right: clamp(1.125rem, 4vw, 4rem); bottom: clamp(1.25rem, 3vw, 2rem); display: flex; align-items: center; gap: 0.5rem; }
.enoc-hero__controls[hidden] { display: none; }
.enoc-hero__count { font-family: var(--wp--preset--font-family--mono); font-size: 0.8125rem; margin-right: 0.5rem; letter-spacing: 0.06em; }
.enoc-hero__controls button { width: 44px; height: 44px; border: 1px solid rgba(248, 248, 245, 0.6); background: rgba(10, 18, 15, 0.35); color: inherit; border-radius: 2px; font-size: 1rem; line-height: 1; cursor: pointer; }
.enoc-hero__controls button:hover { background: rgba(248, 248, 245, 0.18); }
.enoc-hero:not(.is-ready) .enoc-hero__slide:not(:first-child) { display: none; }
@media (max-width: 600px) { .enoc-hero__count { display: none; } .enoc-hero__copy { padding-bottom: 6rem; } }
@media (prefers-reduced-motion: reduce) { .enoc-hero__slide, .enoc-hero__slide.is-active { transition: none; } }

/* ---- Coverflow carousels (spaces, product families, projects) ---- */
.enoc-flow { overflow: hidden; margin: 2.5rem 0 1.5rem; --flow-ink: #171A18; --flow-muted: #626862; --flow-line: rgba(23, 26, 24, 0.14); --flow-ctl: rgba(23, 26, 24, 0.5); }
.enoc-flow--dark { --flow-ink: #F8F8F5; --flow-muted: #8f928d; --flow-line: rgba(255, 255, 255, 0.2); --flow-ctl: rgba(255, 255, 255, 0.56); }
.enoc-flow__shell { position: relative; height: clamp(430px, 47vw, 610px); perspective: 1400px; perspective-origin: 50% 48%; touch-action: pan-y; }
.enoc-flow--dark .enoc-flow__shell { height: clamp(450px, 48vw, 642px); perspective: 1450px; }
.enoc-flow__stage { position: absolute; inset: 0; transform-style: preserve-3d; }
.enoc-flow__card { position: absolute; top: 50%; left: 50%; width: 58%; max-width: 760px; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid rgba(17, 19, 16, 0.16); background: #ECEDE9; color: #fff; text-decoration: none; opacity: 0; visibility: hidden; pointer-events: none; filter: saturate(0.5) brightness(0.78); transform: translate(-50%, -50%) translateZ(-220px) scale(0.72); transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1), opacity 500ms ease, filter 500ms ease, box-shadow 500ms ease; }
.enoc-flow--dark .enoc-flow__card { width: 62%; max-width: 780px; border-color: rgba(255, 255, 255, 0.28); background: #1d1e1b; }
.enoc-flow__card[data-state="active"] { z-index: 4; visibility: visible; opacity: 1; pointer-events: auto; filter: none; transform: translate(-50%, -50%) translateZ(42px) scale(1); box-shadow: 0 34px 80px rgba(17, 19, 16, 0.24); }
.enoc-flow--dark .enoc-flow__card[data-state="active"] { box-shadow: 0 40px 110px rgba(0, 0, 0, 0.52); }
.enoc-flow__card[data-state="previous"] { z-index: 2; visibility: visible; opacity: 0.3; pointer-events: auto; transform: translate(-106%, -50%) translateZ(-175px) rotateY(31deg) scale(0.76); }
.enoc-flow__card[data-state="next"] { z-index: 2; visibility: visible; opacity: 0.3; pointer-events: auto; transform: translate(6%, -50%) translateZ(-175px) rotateY(-31deg) scale(0.76); }
.enoc-flow__card[data-state="hidden"] { visibility: hidden; }
.enoc-flow__card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.enoc-flow__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent 52%); }
.enoc-flow__copy { position: absolute; z-index: 1; left: 1.5rem; right: 1.5rem; bottom: 1.4rem; display: grid; gap: 0.4rem; }
.enoc-flow__copy small { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; }
.enoc-flow__copy strong { font-size: clamp(1.45rem, 2.6vw, 2.5rem); font-weight: 500; line-height: 1; letter-spacing: -0.045em; }
.enoc-flow__card[data-state="previous"] .enoc-flow__copy, .enoc-flow__card[data-state="next"] .enoc-flow__copy { opacity: 0.55; }
.enoc-flow__controls { display: flex; align-items: center; justify-content: space-between; min-height: 58px; }
.enoc-flow__controls[hidden] { display: none; }
.enoc-flow__controls button { width: 56px; height: 52px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--flow-ctl); cursor: pointer; transition: color 180ms ease, transform 180ms ease; }
.enoc-flow__controls button:hover { color: var(--flow-ink); transform: scale(1.08); }
.enoc-flow__controls button:focus-visible { color: var(--flow-ink); outline: 2px solid var(--flow-ink); outline-offset: 2px; }
.enoc-flow__caption { display: grid; grid-template-columns: minmax(0, 680px) auto; justify-content: space-between; gap: 2rem; align-items: start; padding-top: 1.25rem; border-top: 1px solid var(--flow-line); }
.enoc-flow__caption p, .enoc-flow__caption h3 { margin: 0; }
.enoc-flow__text { color: var(--flow-muted); }
.enoc-flow__kicker { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--flow-muted); margin-bottom: 0.4rem !important; }
.enoc-flow__title { font-size: clamp(1.65rem, 3vw, 2.7rem) !important; font-weight: 500; line-height: 1; letter-spacing: -0.045em; margin-bottom: 0.8rem !important; }
.enoc-flow__link { font-size: 0.8125rem; white-space: nowrap; color: var(--flow-ink); text-decoration: none; letter-spacing: 0.02em; }
.enoc-flow__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.enoc-flow__hint { display: none; margin: 1rem 0 0; font-size: 0.65rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--flow-muted); }
@media (max-width: 1100px) {
  .enoc-flow__shell, .enoc-flow--dark .enoc-flow__shell { height: clamp(390px, 52vw, 550px); perspective: 1100px; }
  .enoc-flow__card, .enoc-flow--dark .enoc-flow__card { width: 68%; }
  .enoc-flow__card[data-state="previous"] { transform: translate(-100%, -50%) translateZ(-145px) rotateY(28deg) scale(0.74); }
  .enoc-flow__card[data-state="next"] { transform: translate(0, -50%) translateZ(-145px) rotateY(-28deg) scale(0.74); }
}
@media (max-width: 720px) {
  .enoc-flow__shell, .enoc-flow--dark .enoc-flow__shell { height: clamp(270px, calc(45vw + 126px), 450px); perspective: 880px; }
  .enoc-flow__card, .enoc-flow--dark .enoc-flow__card { width: 78%; }
  .enoc-flow__card[data-state="previous"] { opacity: 0.25; transform: translate(-92%, -50%) translateZ(-105px) rotateY(24deg) scale(0.68); }
  .enoc-flow__card[data-state="next"] { opacity: 0.25; transform: translate(-8%, -50%) translateZ(-105px) rotateY(-24deg) scale(0.68); }
  .enoc-flow__copy { left: 1rem; right: 1rem; bottom: 1rem; }
  .enoc-flow__copy strong { font-size: 1.35rem; }
  .enoc-flow__caption { grid-template-columns: 1fr; gap: 1rem; }
  .enoc-flow__hint { display: block; }
}
@media (prefers-reduced-motion: reduce) { .enoc-flow__card { transition: none; } }

/* ---- Heroes and sections ---- */
.hero-cover { min-height: min(86vh, 820px); }
.hero-cover h1 { max-width: 14ch; }
.page-hero { min-height: 52vh; }
.page-hero h1 { max-width: 18ch; }
.hero-cover h1, .page-hero h1 { margin-left: 0 !important; margin-right: auto !important; }

.section-pad { padding-top: clamp(4.5rem, 8vw, 7rem); padding-bottom: clamp(4.5rem, 8vw, 7rem); }

/* Responsive grids (used by generated page content) */
.enoc-grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); margin: 2.5rem 0 1.5rem; }
.enoc-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.enoc-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.enoc-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .enoc-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .enoc-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .enoc-grid-2, .enoc-grid-3, .enoc-grid-4 { grid-template-columns: 1fr; } }
.enoc-fig { margin: 0; }
.enoc-fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 4px; }
.card-link img { border-radius: 4px; }
.has-inverse-background-color .card-link p { color: rgba(248, 248, 245, 0.7); }
.enoc-logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1.5rem 2rem; align-items: center; }
.enoc-logos img { max-width: 100%; margin: 0 auto; }
.hero-cover .hero-title { font-size: var(--wp--preset--font-size--display); }
.split-feature .wp-block-media-text__content { padding: clamp(2.5rem, 6vw, 6rem); }
.split-feature .wp-block-media-text__media img { object-fit: cover; }
.image-break .wp-block-cover__inner-container { display: none; }

/* Cards */
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link h3 { font-size: 1.375rem; letter-spacing: -0.02em; margin: 0.9rem 0 0.35rem; }
.card-link p { color: var(--wp--preset--color--foreground-muted); margin: 0; font-size: 0.9375rem; }
.card-link img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.card-link:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

.discovery { border-top: 1px solid rgba(23, 26, 24, 0.14); border-bottom: 1px solid rgba(23, 26, 24, 0.14); }
.discovery .wp-block-column { padding: 1.4rem 0; }
.discovery a { text-decoration: none; display: block; }
.discovery strong { display: block; font-size: 1.25rem; letter-spacing: -0.02em; }
.discovery small { color: var(--wp--preset--color--foreground-muted); }

/* Service list */
.service-item { border-top: 1px solid rgba(23, 26, 24, 0.14); padding-top: 1.25rem; }
.service-item .num { font-family: var(--wp--preset--font-family--mono); font-size: 0.8125rem; color: var(--wp--preset--color--foreground-muted); }

/* Logo strip */
.logo-strip img { filter: grayscale(1); opacity: 0.75; max-height: 56px; width: auto; object-fit: contain; }

/* Product gallery */
.systems-grid figure { margin: 0; }
.systems-grid figcaption { text-align: left; margin-top: 0.5rem; font-size: 0.9375rem; }

/* Tables */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td { padding: 0.7rem 0.9rem; border-bottom: 1px solid rgba(23, 26, 24, 0.14); text-align: left; vertical-align: top; }
.wp-block-table th { font-weight: 500; background: var(--wp--preset--color--muted); }
.wp-block-table figcaption { color: var(--wp--preset--color--foreground-muted); font-size: 0.8125rem; }

/* FAQ */
.wp-block-details { border-top: 1px solid rgba(23, 26, 24, 0.14); padding: 1rem 0; }
.wp-block-details summary { font-size: 1.125rem; font-weight: 500; cursor: pointer; }
.wp-block-details[open] summary { margin-bottom: 0.6rem; }

/* Buttons */
.wp-block-button.is-style-outline .wp-block-button__link { border-width: 1px; }
.wp-block-button__link:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid #2F6B58;
  outline-offset: 3px;
}

/* Contact form */
.wpcf7 label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 1rem; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 select, .wpcf7 textarea {
  width: 100%; margin-top: 0.35rem; padding: 0.8rem 0.9rem; border: 1px solid rgba(23, 26, 24, 0.3);
  background: #fff; border-radius: 2px; font: inherit;
}
.wpcf7 input[type="submit"] {
  background: var(--wp--preset--color--accent); color: var(--wp--preset--color--inverse-foreground);
  border: 0; border-radius: 2px; padding: 0.95rem 1.8rem; font: inherit; font-weight: 500; cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--inverse); }

/* Project grid on archive */
.project-grid .wp-block-post-featured-image img { aspect-ratio: 1 / 1; object-fit: cover; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
