/* =======================================
   BASE STYLES – TREG BRAND
   style.css (final, cleaned)
   - Global tokens + layout
   - Header + dropdown nav
   - SERHANT-style mega menu (big left / subtle right)
   - Menu big corner mark (rt.)
   - Global hero/sections/buttons/footer/team
   ======================================= */

/* =========================
   TOKENS / GLOBALS
   ========================= */
:root {
  --treg-charcoal: #1e180d;
  --treg-slate: #373a3a;
  --treg-cream: #fafafa;
  --treg-taupe: #c9b8a4;
  --treg-bronze: #cfb18e;

  --container-max: 1040px;
  --container-pad: 1.25rem;
  --header-h: 78px; /* used by mega menu positioning */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PT Serif", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--treg-cream);
  color: var(--treg-charcoal);
}

/* Simple page frame */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1 0 auto;
}

/* Layout helper */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.75rem var(--container-pad);
}

/* Accessible focus ring (subtle, on-brand) */
:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid rgba(207, 177, 142, 0.85);
  outline-offset: 3px;
  border-radius: 10px;
}

/* =========================
   HEADER / NAV
   ========================= */
.site-header {
  background: var(--treg-cream);
  border-bottom: 1px solid #e5e1d8;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}

/* logo */
.logo-link {
  display: flex;
  align-items: center;
  max-height: 48px;
  flex: 0 0 auto;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

/* nav wrapper */
.nav {
  flex: 1;
}

/* main nav list */
.nav-list {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* nav item wrapper */
.nav-item {
  display: flex;
  align-items: center;
}

/* top-level nav links */
.nav-link,
.nav-link-dropdown {
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--treg-charcoal);
  cursor: pointer;
  text-decoration: none;
  border: 0;
  background: none;

  display: inline-block;
  line-height: 1;
  padding: 0.2rem 0 0.18rem;
  margin: 0;

  position: relative;
  top: -1px;
}

/* keep HOME at baseline */
.nav-item:first-child .nav-link {
  top: 0;
}

.nav-link:hover,
.nav-link:focus,
.nav-link-dropdown:hover,
.nav-link-dropdown:focus {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Dropdown container */
.nav-item.has-dropdown {
  position: relative;
}

/* Dropdown panel */
.nav-dropdown {
  position: absolute;
  right: 0;
  top: 120%;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid #e5e1d8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 0;
  list-style: none;
  margin: 0;

  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 20;
}

.nav-item.has-dropdown:hover .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* links inside dropdown */
.nav-dropdown-link {
  display: block;
  padding: 0.5rem 1rem;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  text-transform: none;
  color: var(--treg-charcoal);
  white-space: nowrap;
  text-decoration: none;
}

.nav-dropdown-link:hover,
.nav-dropdown-link:focus {
  background: #faf7f1;
}

/* =========================
   HEADER MEGA MENU
   SERHANT-style: big left / subtle right
   ========================= */

/* Menu button */
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: var(--treg-charcoal);
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  flex: 0 0 auto;
}

.menu-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.menu-btn-icon {
  width: 18px;
  height: 12px;
  position: relative;
  display: inline-block;
}

.menu-btn-icon::before,
.menu-btn-icon::after,
.menu-btn-icon span {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--treg-charcoal);
  opacity: 0.85;
}

.menu-btn-icon::before {
  top: 0;
}

.menu-btn-icon::after {
  bottom: 0;
}

.menu-btn-icon span {
  top: 50%;
  transform: translateY(-50%);
}

/* Backdrop */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 8, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 9990;
}

/* Panel (narrower + slightly taller) */
.menu-panel {
  position: fixed;
  top: calc(var(--header-h) + 10px);

  left: 7.5vw;
  right: 7.5vw;

  height: calc(72vh - (var(--header-h) + 20px));
  max-height: 620px;

  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.20);

  transform: translateY(-10px) scale(0.99);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9999;

  overflow: hidden;
}

/* Make panel-inner a positioning context (needed for corner mark) */
.menu-panel-inner {
  position: relative;
  height: 100%;
  padding: 1.1rem 1.35rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.menu-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.menu-panel-title {
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--treg-slate);
}

.menu-panel-top-right {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-panel-mark {
  height: 38px;
  width: auto;
  opacity: 0.95;
}

.menu-close {
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: #fff;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.menu-close:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.10);
}

/* Two-column layout */
.menu-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.55fr);
  gap: 2rem;
  align-items: start;
  overflow: hidden;

  /* reserve space for the big corner mark */
  padding-right: clamp(180px, 22vw, 320px);
}

/* LEFT: big primary links */
.menu-primary {
  padding: 0.25rem 0 0.5rem;
  text-align: right;
  padding-right: 1.25rem;

  display: flex;
  flex-direction: column;
  min-height: 0;
}

.menu-primary-link {
  display: block;
  text-decoration: none;
  color: var(--treg-charcoal);
  font-family: "League Spartan", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 2.4vw, 2.4rem);
  line-height: 1.05;
  padding: 0.45rem 0;
  text-transform: lowercase;
}

.menu-primary-link:hover,
.menu-primary-link:focus {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

/* CTA row — LEFT side of divider, flush-right to it */
.menu-cta-row {
  margin-top: auto;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 0.75rem;
  padding-right: 1.25rem;
}

/* RIGHT: grouped subtle links (EQUAL box sizes + centered vertically) */
.menu-secondary {
  border-left: 1px solid rgba(0, 0, 0, 0.10);
  padding-left: 1.25rem;

  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  /* key: equal-sized grid cells */
  grid-auto-rows: minmax(180px, 1fr);

  /* key: center the whole grid vertically */
  align-content: center;

  gap: 1rem;
  justify-items: start;
}

/* Boxes */
.menu-col {
  width: 100%;
  height: 100%;
  max-width: 380px;

  display: flex;
  flex-direction: column;

  background: rgba(250, 250, 250, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 1rem 1rem 0.9rem;
}

/* Spacer occupies grid slot but is invisible (no “4th box”) */
.menu-col--spacer {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  visibility: hidden; /* keeps slot, hides it */
  pointer-events: none;
}

.menu-col-title {
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--treg-slate);
  margin-bottom: 0.6rem;
}

.menu-link {
  display: block;
  text-decoration: none;
  color: var(--treg-charcoal);
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.menu-link:hover,
.menu-link:focus {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Big corner mark (rt.) */
.menu-corner-mark {
  position: absolute;
  right: 26px;
  bottom: 22px;

  width: clamp(140px, 18vw, 260px);
  height: auto;

  opacity: 0.95;
  pointer-events: none;
  user-select: none;

  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.10));
}

/* Open state */
body.menu-open .menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.menu-open .menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Responsive */
@media (max-width: 900px) {
  .menu-panel {
    left: 16px;
    right: 16px;
    height: calc(78vh - (var(--header-h) + 18px));
    max-height: none;
  }

  .menu-panel-mark {
    height: 32px;
  }

  .menu-layout {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    overflow: auto;
    padding-right: 0; /* no reserved space on mobile */
  }

  .menu-primary {
    text-align: left;
    padding-right: 0;
  }

  .menu-secondary {
    border-left: none;
    padding-left: 0;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    overflow: visible;
    align-content: start;
    justify-items: stretch;
  }

  .menu-col {
    max-width: none;
  }

  .menu-cta-row {
    justify-content: flex-start;
    padding-right: 0;
  }

  .menu-corner-mark {
    display: none;
  }
}

/* =========================
   HERO (GLOBAL)
   ========================= */
.hero {
  background: var(--treg-cream);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.hero-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2.5rem var(--container-pad) 2.75rem;
}

.hero-label {
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--treg-slate);
  margin-bottom: 0.4rem;
}

.hero-title {
  font-family: "League Spartan", system-ui, sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  text-transform: lowercase;
  margin: 0 0 0.4rem;
  color: var(--treg-charcoal);
  line-height: 1.12;
}

.hero-subtitle {
  max-width: 1080px;
  margin: 0.4rem 0 1rem;
  color: var(--treg-slate);
  line-height: 1.6;
}

/* =========================
   SECTIONS / GRID / LISTS
   ========================= */
.section {
  padding: 3rem 0;
}

.section-heading {
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}

.section-lede {
  margin: 0 0 1.25rem;
  color: var(--treg-slate);
  line-height: 1.6;
}

.section-grid {
  display: grid;
  gap: 1.75rem;
}

.section-grid.two {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
}

@media (max-width: 800px) {
  .section-grid.two {
    grid-template-columns: 1fr;
  }
}

ul {
  padding-left: 1.1rem;
}

li + li {
  margin-top: 0.35rem;
}

/* =========================
   CTA SECTIONS
   ========================= */
.section-cta {
  text-align: center;
}

.section-cta-title {
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-cta-meta {
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--treg-slate);
  margin-bottom: 1rem;
}

/* =========================
   ABOUT PHOTO
   ========================= */
.about-photo {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

/* =========================
   TEAM INDEX
   ========================= */
.section.section-muted {
  padding-top: 2.2rem;
  padding-bottom: 2.2rem;
}

.section:not(.section-muted):not(.section-cta) {
  padding-top: 2.4rem;
  padding-bottom: 2.4rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.team-card {
  position: relative;
  background: #ffffff;
  border-radius: 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.25rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.14);
  border-color: rgba(0, 0, 0, 0.12);
}

.team-thumb {
  width: 100%;
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.9rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.team-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.02);
  transition: transform 0.22s ease;
}

.team-card:hover .team-thumb img {
  transform: scale(1.06);
}

.team-card:hover .team-card-title {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.team-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: block;
  border-radius: 0.9rem;
  text-decoration: none;
}

.team-card > *:not(.team-card-overlay) {
  pointer-events: none;
}

.team-card-title {
  font-family: "League Spartan", system-ui, sans-serif;
  font-size: 1.1rem;
  text-transform: lowercase;
  margin: 0 0 0.2rem;
}

.team-card-role {
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--treg-slate);
  margin-bottom: 0.6rem;
}

.team-card-text {
  font-size: 0.9rem;
  color: var(--treg-slate);
  margin: 0 0 1.1rem;
  line-height: 1.55;
}

.team-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  background: var(--treg-bronze);
  border: 1px solid var(--treg-bronze);
  color: #ffffff;
  text-decoration: none;
  margin-top: auto;
  align-self: center;
  pointer-events: auto;
  position: relative;
  z-index: 11;
}

.team-card-link:hover,
.team-card-link:focus {
  background: var(--treg-taupe);
  border-color: var(--treg-taupe);
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 720px) {
  .team-thumb {
    height: 170px;
  }
}

/* Inline links in sections */
.section p a,
.section-lede a {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;

  font-family: "Roboto", system-ui, sans-serif;
  font-size: inherit;
  text-transform: uppercase;
  letter-spacing: 0.12em;

  color: var(--treg-charcoal);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.section p a:hover,
.section-lede a:hover {
  background: none !important;
  color: var(--treg-charcoal);
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
}

.site-footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.5rem var(--container-pad);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.footer-brand {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--treg-slate);
}

.footer-links a {
  color: var(--treg-charcoal);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* =========================
   BUTTONS (GLOBAL)
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: "League Spartan", system-ui, sans-serif;
  font-size: 0.9rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  padding: 0.7rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
  gap: 0.35rem;
}

.btn-primary {
  background-color: var(--treg-charcoal);
  border-color: var(--treg-charcoal);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #000;
  border-color: #000;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--treg-charcoal);
  border: 1px solid var(--treg-bronze);
}

.btn-ghost:hover,
.btn-ghost:focus {
  background: rgba(207, 177, 142, 0.12);
  border-color: var(--treg-bronze);
  text-decoration: none;
}

.page-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* =========================
   TEAM CONTACT ICON BUTTONS
   ========================= */
.team-contact-icons {
  display: flex;
  gap: 10px;
  margin: 14px 0 10px;
  flex-wrap: wrap;
}

.team-contact-icons a {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--treg-charcoal);
  text-decoration: none;
  border: 1px solid rgba(207, 177, 142, 0.6);
  background: rgba(207, 177, 142, 0.08);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.team-contact-icons a:hover,
.team-contact-icons a:focus {
  transform: translateY(-1px);
  background: rgba(207, 177, 142, 0.14);
  border-color: var(--treg-bronze);
  outline: none;
}

/* Safe separator for home hero if defined elsewhere */
.home-hero {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
