/* =====================================================================
   The InterTech Group — Site Styles
   WCAG 2.1 AA compliant design system
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette */
  --c-navy-darkest: #0a3254;
  --c-navy:         #004e7d;
  --c-blue:         #007dc1;
  --c-gold:         #fbae42;

  /* Neutrals */
  --c-white:        #ffffff;
  --c-off-white:    #f7f8fa;
  --c-grey-50:      #eef1f5;
  --c-grey-100:     #d8dde4;
  --c-grey-300:     #9aa3b1;
  --c-grey-700:     #3a4250;
  --c-text:         #1a1f2c;
  --c-text-muted:   #4d5566;
  --c-on-dark:      #ffffff;
  --c-on-dark-mute: #c9d3df;

  /* Focus ring (visible against both light and dark) */
  --focus-ring: 0 0 0 3px var(--c-gold), 0 0 0 5px var(--c-navy-darkest);
  --focus-ring-light: 0 0 0 3px var(--c-gold), 0 0 0 5px var(--c-white);

  /* Typography */
  --ff-sans: "Inter", "Helvetica Neue", Arial, system-ui, -apple-system,
             "Segoe UI", Roboto, sans-serif;
  --ff-display: "Inter", "Helvetica Neue", Arial, system-ui, -apple-system,
                "Segoe UI", Roboto, sans-serif;

  --fz-base: 1.0625rem;     /* 17px */
  --lh-base: 1.6;

  /* Layout */
  --max-w: 1200px;
  --pad-x: clamp(1rem, 4vw, 2.25rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
  --header-h: 100px;

  /* Motion */
  --ease: cubic-bezier(.4, .0, .2, 1);
  --t-fast: 180ms;
  --t-mid: 360ms;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: var(--fz-base);
  line-height: var(--lh-base);
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a {
  color: var(--c-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { color: var(--c-navy-darkest); }

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: inherit;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 700;
}

p { margin: 0 0 1em; }

/* Visually-hidden but available to screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Visible focus outline — applies to all focusable elements */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px; left: 8px;
  background: var(--c-navy-darkest);
  color: var(--c-white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  text-decoration: none;
  z-index: 1000;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 0; color: var(--c-white); }

/* Anchor offset — keeps section title visible below sticky header */
:where(section[id], [id]) { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-grey-100);
  box-shadow: 0 1px 3px rgba(10, 50, 84, .04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  min-height: var(--header-h);
}
.site-logo { display: inline-flex; }
.site-logo img {
  width: 280px;
  max-width: 60vw;
  height: auto;
}
@media (max-width: 600px) {
  .site-logo img { width: 220px; }
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  text-decoration: none;
  color: var(--c-navy-darkest);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.5rem 0.25rem;
  position: relative;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0.25rem; right: 0.25rem; bottom: 0.15rem;
  height: 2px;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast) var(--ease);
}
.primary-nav a:hover::after,
.primary-nav a:focus-visible::after { transform: scaleX(1); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--c-grey-100);
  border-radius: 6px;
  padding: 0; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
}
.nav-toggle-bar {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-navy-darkest);
  border-radius: 2px;
  transition: transform var(--t-fast) var(--ease);
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--c-white);
    border-bottom: 1px solid var(--c-grey-100);
    padding: 1rem var(--pad-x) 1.25rem;
    box-shadow: 0 8px 16px rgba(10,50,84, .08);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0.25rem; }
  .primary-nav a { display: block; padding: 0.75rem 0.5rem; }
  .primary-nav a::after { display: none; }
  .primary-nav a:hover, .primary-nav a:focus-visible {
    background: var(--c-grey-50);
    border-radius: 6px;
  }
}

/* ---------- Sections ---------- */
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section-blue {
  background: var(--c-navy-darkest);
  color: var(--c-on-dark);
}
.section-blue h2,
.section-blue h3 { color: var(--c-on-dark); }

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.6rem;
}
.section-header h2::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 64px; height: 3px;
  background: var(--c-gold);
  border-radius: 2px;
}
.section-subhead {
  margin: 0.6rem 0 0;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--c-on-dark-mute);
}
.section-lead {
  max-width: 56ch;
  margin: 0.75rem auto 0;
  color: var(--c-on-dark-mute);
  font-size: 1.05rem;
}
.section-header-light h2 { color: var(--c-navy-darkest); }
.section-header-light h2::after { background: var(--c-gold); }

/* Prose */
.prose {
  font-size: 1.05rem;
  line-height: 1.7;
}
.prose-narrow {
  max-width: 80ch;
  margin: 0 auto;
}
.prose-wide {
  max-width: 960px;
  margin: 0 auto;
}
.founder-section .prose,
.philosophy-section .prose {
  max-width: 960px;
  margin: 0 auto;
}
.prose h3 {
  margin-top: 1.5em;
  color: var(--c-gold);
  font-size: clamp(1.1rem, 1.75vw, 1.35rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.section:not(.section-blue) .prose h3 {
  color: var(--c-navy-darkest);
}

/* Light section explicit styling (white bg) */
.section-light {
  background: var(--c-white);
  color: var(--c-text);
}
.section-light h2,
.section-light h3 { color: var(--c-navy-darkest); }
.section-light .section-subhead { color: var(--c-text-muted); }
.section-light .section-lead { color: var(--c-text-muted); }

.prose ul.keys-list {
  margin: 0.5rem 0 1.25rem;
  padding-left: 1.25rem;
}
.prose ul.keys-list li {
  margin-bottom: 0.35rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--c-gold);
  color: var(--c-navy-darkest);
  border-color: var(--c-gold);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: #ffc36b;
  color: var(--c-navy-darkest);
  border-color: #ffc36b;
}

.btn-ghost {
  background: transparent;
  color: var(--c-navy-darkest);
  border-color: var(--c-navy-darkest);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  background: var(--c-navy-darkest);
  color: var(--c-white);
}

.btn-outline-light {
  background: transparent;
  color: var(--c-on-dark);
  border-color: var(--c-on-dark);
}
.btn-outline-light:hover, .btn-outline-light:focus-visible {
  background: var(--c-on-dark);
  color: var(--c-navy-darkest);
}

/* ---------- Hero / carousel ---------- */
.hero {
  background:
    linear-gradient(180deg, rgba(10,50,84, .92), rgba(10,50,84, 1)),
    radial-gradient(circle at 20% 10%, rgba(0,125,193,.35), transparent 60%);
  background-color: var(--c-navy-darkest);
  color: var(--c-on-dark);
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.carousel-viewport {
  overflow: hidden;
  position: relative;
}
.carousel-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform var(--t-mid) var(--ease);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.hero-slide {
  display: block;
  padding: 0 var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}
.hero-image {
  margin: 0 auto 2rem;
  width: 100%;
  max-width: 1100px;
}
.hero-image img {
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0, .35);
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.hero-content {
  max-width: 70ch;
  margin: 0 auto;
  padding: 0.5rem 0 0.5rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  color: var(--c-gold);
  font-weight: 700;
  margin-bottom: 1rem;
}
.hero-body {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
  color: var(--c-on-dark-mute);
  margin: 0 auto;
}

/* Carousel controls */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding: 0 var(--pad-x);
}
.carousel-btn,
.carousel-pause {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255, .08);
  color: var(--c-on-dark);
  border: 1.5px solid rgba(255,255,255, .35);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.carousel-btn svg,
.carousel-pause svg {
  width: 22px; height: 22px;
}
.carousel-btn:hover,
.carousel-pause:hover {
  background: var(--c-gold);
  color: var(--c-navy-darkest);
  border-color: var(--c-gold);
}

/* On light section variants */
.section:not(.section-blue) .carousel-btn,
.section:not(.section-blue) .carousel-pause {
  background: var(--c-grey-50);
  color: var(--c-navy-darkest);
  border-color: var(--c-grey-100);
}
.section:not(.section-blue) .carousel-btn:hover,
.section:not(.section-blue) .carousel-pause:hover {
  background: var(--c-gold);
  border-color: var(--c-gold);
}

/* Pause/play state */
.carousel-pause .icon-play { display: none; }
.carousel-pause[aria-pressed="true"] .icon-pause { display: none; }
.carousel-pause[aria-pressed="true"] .icon-play { display: block; }

/* Dots */
.carousel-dots {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 0 0.75rem;
  padding: 0;
}
.carousel-dot {
  width: 12px; height: 12px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255, .35);
  border: 1.5px solid rgba(255,255,255, .35);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.carousel-dot.is-active,
.carousel-dot[aria-current="true"] {
  background: var(--c-gold);
  border-color: var(--c-gold);
  transform: scale(1.15);
}
.carousel-dot:hover { background: var(--c-gold); border-color: var(--c-gold); }

/* ---------- Founder ---------- */
.founder-portrait {
  margin: 0 auto 2rem;
  max-width: 640px;
}
.founder-portrait img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0,0,0, .3);
}

/* ---------- Philosophy ---------- */
.philosophy-image {
  margin: 0 auto 2rem;
  max-width: 720px;
}
.philosophy-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0,0,0, .3);
}

/* ---------- Globally Diversified / industries carousel ---------- */
.global-section {
  background: var(--c-white);
}

.industries-carousel { margin-top: 2rem; }

.industries-track {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 1.25rem;
}
.industry-card {
  flex: 0 0 calc((100% - 2.5rem) / 3);
  min-width: 0;
}
@media (max-width: 900px) {
  .industry-card { flex: 0 0 calc((100% - 1.25rem) / 2); }
}
@media (max-width: 600px) {
  .industry-card { flex: 0 0 100%; }
  .industries-track { gap: 1rem; }
}

.industry-card article {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #0d2742;
  box-shadow: 0 14px 30px rgba(0,0,0, .35);
  isolation: isolate;
}
.industry-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
  transition: filter var(--t-mid) var(--ease),
              transform var(--t-mid) var(--ease);
}
.industry-card:hover img,
.industry-card:focus-within img {
  filter: brightness(0.9);
  transform: scale(1.04);
}
.industry-card h3 {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-white);
  background: linear-gradient(180deg, transparent, rgba(0,0,0, .85));
  text-align: center;
  z-index: 1;
}

/* ---------- Antigravity ---------- */
.antigravity-section {
  background: var(--c-white);
  color: var(--c-text);
}
.antigravity-image {
  margin: 0 auto 2rem;
  max-width: 1100px;
}
.antigravity-image img {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(10,50,84, .15);
}
.antigravity-section .prose { color: var(--c-text); }

/* ---------- Foundation ---------- */
.foundation-section {
  background: var(--c-navy-darkest);
  color: var(--c-on-dark);
}
.foundation-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 800px) {
  .foundation-grid { grid-template-columns: 1fr; }
}
.foundation-image img {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}
.foundation-content h2 {
  color: var(--c-on-dark);
  position: relative;
  padding-bottom: 0.6rem;
  margin-bottom: 1.25rem;
}
.foundation-content h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 64px; height: 3px;
  background: var(--c-gold);
  border-radius: 2px;
}
.foundation-content p { color: var(--c-on-dark-mute); }
.callout {
  background: rgba(255, 255, 255, .08);
  border-left: 4px solid var(--c-gold);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 4px;
  color: var(--c-on-dark);
}
.callout strong { color: var(--c-on-dark); }
.foundation-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Team banner (sits at bottom of Foundation section) ---------- */
.team-banner {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.team-banner img {
  margin: 0 auto;
  max-width: 1100px;
  width: 100%;
  display: block;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.45));
}

/* Community Involvement banner — sits below the Tikkun Olam image */
.community-banner {
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
}
.community-banner img {
  margin: 0 auto;
  max-width: 1100px;
  width: 100%;
  display: block;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* ---------- Footer ---------- */
.site-footer { color: var(--c-on-dark); }
.footer-top {
  background: var(--c-navy-darkest);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
}
.footer-brand img {
  margin: 0;
  width: 260px;
  max-width: 100%;
  height: auto;
}
@media (max-width: 700px) {
  .footer-brand img { margin: 0 auto; }
}
.footer-contact {
  text-align: right;
}
@media (max-width: 700px) { .footer-contact { text-align: center; } }
.footer-contact h2 {
  color: var(--c-white);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}
.footer-contact p, .footer-contact address {
  margin: 0 0 0.4rem;
  color: var(--c-on-dark-mute);
  font-style: normal;
  line-height: 1.5;
}
.footer-phone {
  color: var(--c-gold);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
}
.footer-phone:hover { color: #ffc36b; text-decoration: underline; }
.footer-link {
  color: var(--c-on-dark-mute);
  font-size: 0.95rem;
}
.footer-link:hover { color: var(--c-gold); }

.footer-bottom {
  background: var(--c-white);
  color: var(--c-text);
  padding: 1rem 0;
  border-top: 4px solid var(--c-gold);
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.copyright {
  margin: 0;
  font-size: 0.9rem;
  color: var(--c-text-muted);
}
.footer-nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a {
  color: var(--c-navy-darkest);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.footer-nav a:hover { text-decoration: underline; color: var(--c-navy-darkest); }

.back-to-top {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c-navy-darkest);
  color: var(--c-white);
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast) var(--ease);
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top:hover { background: var(--c-blue); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 200;
  background: var(--c-white);
  color: var(--c-text);
  border: 1px solid var(--c-grey-100);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(10,50,84, .25);
  max-width: 480px;
  margin-left: auto;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
  padding: 1.25rem 1.4rem;
}
.cookie-title {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: var(--c-navy-darkest);
}
.cookie-banner p {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.cookie-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.cookie-actions .btn { padding: 0.6rem 1.1rem; font-size: 0.95rem; }
@media (max-width: 540px) {
  .cookie-banner { inset: auto 0.75rem 0.75rem 0.75rem; max-width: none; }
}

/* ---------- Privacy / inner pages ---------- */
.inner-page {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  max-width: 800px;
}
.inner-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--c-navy-darkest);
  margin-bottom: 1rem;
}
.inner-page h2 {
  margin-top: 2rem;
  color: var(--c-navy-darkest);
}
.inner-page .breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--c-text-muted);
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .cookie-banner,
  .carousel-controls, .nav-toggle, .back-to-top { display: none !important; }
  .section { padding: 1rem 0; break-inside: avoid; }
  body { color: #000; background: #fff; }
}
