:root {
  --navy:  #1B2E4B;
  --blue:  #3A5A8C;
  --teal:  #4ECDC4;
  --mist:  #A8DADC;
  --bg:    #A8DADC;
  --white: #F7FAFB;
  --text-dark: #1B2E4B;
  --text-mid:  rgba(27,46,75,0.7);
  --nav-h: 76px; /* fallback; synced to real nav height by script.js */
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}

/* Visually hidden but still readable by screen readers and search
   engines — NOT display:none (which some crawlers/assistive tech
   discount as "not real content"). Standard technique, used here only
   for the page's single real <h1> — see index.html's opening <body>. */
.sr-only{
  position:absolute !important;width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
html{scroll-behavior:smooth;}
body{background:var(--bg);color:var(--navy);font-family:'Space Grotesk',sans-serif;overflow-x:hidden;}

/* ── NAV (now a top bar) ── */
nav{
  position:fixed;top:0;left:0;right:0;
  width:100%;
  background:rgba(27,46,75,0.97);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(78,205,196,0.15);
  display:flex;flex-direction:row;align-items:center;justify-content:space-between;
  /* Was flex-wrap:wrap on all sizes, which let the nav <ul> drop onto a
     second line underneath the logo on ordinary desktop widths, not just
     genuinely narrow ones. Desktop now never wraps; wrapping is
     re-enabled only inside the small-screen media query below. */
  flex-wrap:nowrap;row-gap:0.5rem;
  padding:1rem 2.5rem;z-index:200;
}
nav .nav-logo{
  display:flex;align-items:center;flex-shrink:0;
  margin-bottom:0;padding-bottom:0;
  /* Explicit longhand on every side (not just bottom/right) so no
     browser's default <a> user-agent border can show through — this is
     what produced the border visible in Edge but not Firefox. */
  border-top:none;border-left:none;border-bottom:none;
  border-right:1px solid rgba(78,205,196,0.15);
  outline:none;
  padding-right:1.75rem;margin-right:1rem;
  opacity:1 !important;visibility:visible !important;
}
nav .nav-logo:focus,nav .nav-logo:focus-visible,nav .nav-logo:active{outline:none;border:none;border-right:1px solid rgba(78,205,196,0.15);}
nav .nav-logo img{width:auto;max-height:32px;border:none;outline:none;}
.logo-text{
  font-family:'Playfair Display',serif;font-size:1rem;font-weight:700;
  color:var(--white);letter-spacing:0.01em;white-space:nowrap;
}
.logo-text em{font-style:italic;font-weight:400;color:var(--teal);}
nav ul{list-style:none;display:flex;flex-direction:row;flex-wrap:nowrap;gap:0.1rem;flex-shrink:1;}
nav ul li a{
  font-family:'Montserrat',sans-serif;font-size:0.65rem;font-weight:500;
  letter-spacing:0.18em;text-transform:uppercase;
  color:rgba(247,250,251,0.65);text-decoration:none;
  display:block;padding:0.55rem 0.7rem;
  border-left:none;border-bottom:2px solid transparent;transition:all 0.3s ease;
}
nav ul li a:hover,nav ul li a.active{
  color:var(--teal);border-bottom-color:var(--teal);
}

/* ── MAIN ── */
main{margin-left:0;margin-top:var(--nav-h);}
section{
  min-height:calc(100vh - var(--nav-h));padding:6rem 5rem;
  display:flex;flex-direction:column;justify-content:center;
  position:relative;overflow:hidden;
}
section:nth-child(odd){background:rgba(168,218,220,0.55);}
section:nth-child(even){background:rgba(168,218,220,0.35);}

.section-label{
  font-family:'Montserrat',sans-serif;font-size:0.62rem;
  letter-spacing:0.32em;text-transform:uppercase;color:var(--blue);
  margin-bottom:1.25rem;display:flex;align-items:center;gap:0.75rem;
}
.section-label::after{content:'';display:block;width:36px;height:1px;background:var(--blue);opacity:0.4;}

h2{
  font-family:'Playfair Display',serif;font-size:clamp(2rem,3.5vw,3.2rem);
  font-weight:700;line-height:1.15;color:var(--navy);margin-bottom:1.5rem;
}
p{
  font-family:'Space Grotesk',sans-serif;font-style:italic;
  font-size:1rem;line-height:1.85;color:var(--text-mid);max-width:640px;
}
.divider{width:48px;height:2px;background:var(--teal);margin:1.25rem 0;}

/* ── REVEAL ── */
.reveal{opacity:0;transform:translateY(28px);transition:opacity 0.75s ease,transform 0.75s ease;}
.reveal.visible{opacity:1;transform:translateY(0);}

/* ══════════════════════════════
   SECTION 1 — MISSION
══════════════════════════════ */
#mission{
  background:#192F48 !important;position:relative;
  /* Logo and text now stack vertically (was: both independently
     centered at the exact same point, which — now that the text is
     also centered per request — meant the opaque logo fully hid it
     rather than just overlapping its edge). This still reads as "logo
     above the text" (both in DOM order and, at any breakpoint where
     they get close enough to brush against each other, in z-index),
     without the two ever being able to fully collide again. */
  align-items:center;gap:2.5rem;
}

/* Smooths the hard navy → light-bg cut at the bottom of the mission
   section, echoing the teal "active" bar used under nav links. */
#mission::after{
  content:'';
  position:absolute;left:0;right:0;bottom:0;
  height:min(22vh,170px);
  pointer-events:none;z-index:1;
  background-image:
    linear-gradient(to right,transparent,rgba(78,205,196,0.85) 50%,transparent),
    linear-gradient(to bottom,transparent,var(--bg) 90%);
  background-size:55% 2px,100% 100%;
  background-position:center 42%,center;
  background-repeat:no-repeat,no-repeat;
}

.infinity-wrap{
  position:relative;
  /* 200% of the original 34vw / 380px baseline width, per request —
     but also capped by height (min(46vh,520px)) so it can never grow
     taller than the section itself on short/wide viewports; the video
     inside scales down proportionally (object-fit:contain below)
     rather than overflowing or being cropped. Height cap is a bit
     smaller than before now that it shares the section with the text
     block below it rather than sitting on top of it. */
  width:68vw;max-width:760px;
  height:auto;max-height:min(46vh,520px);
  /* Kept in case any breakpoint ever brings it close enough to the
     text to brush against it — not load-bearing now that they no
     longer share the same position (see #mission above). */
  z-index:5;
  display:flex;align-items:center;justify-content:center;
  border:none;outline:none;box-shadow:none;
}
.infinity-wrap img,
.infinity-wrap canvas,
.infinity-wrap video{
  width:100%;height:auto;max-height:100%;object-fit:contain;display:block;
  border:0 none !important;outline:0 none !important;box-shadow:none !important;
  -webkit-appearance:none;appearance:none;background:transparent;
}
/* Chromium/Edge draws its own default UI (border + play glyph) over a
   <video> when it hasn't started playing yet — e.g. autoplay briefly
   blocked, or before the first frame decodes — which no CSS `border`
   rule can override since it isn't a real border, it's part of the
   browser's built-in media UI. Explicitly hiding that built-in
   chrome/controls layer removes it in Chromium-based browsers; Firefox
   never draws it in the first place, which is why the difference only
   showed up in Edge. */
.infinity-wrap video::-webkit-media-controls,
.infinity-wrap video::-webkit-media-controls-panel,
.infinity-wrap video::-webkit-media-controls-start-playback-button{
  display:none !important;
  -webkit-appearance:none !important;
}
.img-placeholder{
  width:100%;aspect-ratio:1/1;border:2px dashed rgba(168,218,220,0.45);
  border-radius:8px;display:flex;align-items:center;justify-content:center;
  background:rgba(168,218,220,0.04);
}
.img-placeholder span{
  font-family:'Montserrat',sans-serif;font-size:0.7rem;letter-spacing:0.14em;
  text-transform:uppercase;color:rgba(168,218,220,0.5);text-align:center;padding:1rem;
}
#netCanvas{
  position:absolute;inset:0;
  width:100%;height:100%;
  animation:netFade 5s ease-in-out infinite alternate;
  z-index:2;
  pointer-events:none;
}
@keyframes netFade{0%{opacity:0;}100%{opacity:0.7;}}

.mission-content{
  position:relative;z-index:3;
  /* 80% of the page, per request — capped at 980px so line length
     doesn't become uncomfortably wide on very large monitors; on any
     screen up to ~1225px wide (most laptops/desktops), 80% is still
     the binding constraint. */
  max-width:min(80%,980px);margin:0 auto;text-align:center;
}
.mission-content h2{color:var(--white);font-size:clamp(1.5rem,2.4vw,2.3rem);}
.mission-content .section-label{color:var(--teal);justify-content:center;}
/* Decorative line after the "OUR MISSION" label — hidden per request. */
.mission-content .section-label::after{display:none;}
.mission-subline{
  margin-top:1.75rem;margin-bottom:0;
  padding-top:0;
  /* Was a top border acting as a divider line above this text — hidden
     per request (the line, not the spacing). */
  border-top:none;
  text-align:center;
}


/* ══════════════════════════════
   SECTION 2 — MEETING + CALENDAR
══════════════════════════════ */
.cta-btn{
  display:inline-block;margin-top:2rem;padding:0.85rem 2.2rem;
  background:transparent;border:1.5px solid var(--navy);
  color:var(--navy);font-family:'Montserrat',sans-serif;
  font-size:0.72rem;letter-spacing:0.22em;text-transform:uppercase;
  text-decoration:none;cursor:pointer;
  transition:all 0.3s ease;position:relative;overflow:hidden;
}
.cta-btn::before{
  content:'';position:absolute;inset:0;background:var(--navy);
  transform:scaleX(0);transform-origin:left;transition:transform 0.3s ease;z-index:-1;
}
.cta-btn:hover{color:var(--mist);}
.cta-btn:hover::before{transform:scaleX(1);}

/* Calendar modal */
.cal-overlay{
  display:none;position:fixed;inset:0;background:rgba(27,46,75,0.65);
  backdrop-filter:blur(6px);z-index:500;align-items:center;justify-content:center;
  align-items:safe center;
  padding:2rem 1rem;
  /* The overlay itself is the thing that scrolls if content is ever
     taller than the viewport — not a box nested inside the card. That
     way there's never a second, harder-to-notice scrollbar trapped
     inside the modal; the whole page-level overlay just scrolls like
     normal. .cal-box's height is kept in sync with whichever face is
     currently showing (see syncCalBoxHeight() in script.js), so this
     only actually engages on genuinely short viewports. */
  overflow-y:auto;
}
.cal-overlay.open{display:flex;}

/* .cal-box is the 3D flip perspective wrapper; .cal-flipper is the part
   that actually rotates, with .cal-front (calendar) and .cal-back
   (booking form) as its two faces. No scrollbar by default — the box
   sizes to its content; a scrollbar only appears on very short screens
   (see the max-height media query near the bottom of this file). */
.cal-box{
  width:min(65vw,760px); max-width:100%; position:relative;
  perspective:1600px;
  /* Height is kept in sync with whichever face (front/back, and the
     booking form's own form/confirmation faces) is currently showing —
     see syncCalBoxHeight() in script.js. Starts unset/auto so it sizes
     correctly the first time it's ever shown. */
}
.cal-flipper{
  position:relative; width:100%; height:100%; transition:transform 0.6s cubic-bezier(.4,.2,.2,1);
  transform-style:preserve-3d;
}
.cal-flipper.flipped{ transform:rotateY(180deg); }
.cal-front,.cal-back{
  background:var(--white);border-radius:4px;padding:2.5rem;
  backface-visibility:hidden;
  display:flex;gap:2rem;flex-wrap:wrap;
  min-width:0;
}
.cal-front{ position:relative; }
.cal-back{
  position:absolute; inset:0; top:0;
  transform:rotateY(180deg);
  flex-direction:column; gap:0;
}
/* One close button for the whole card, positioned on .cal-box itself
   rather than duplicated once per face — it's always in the same
   place and can never appear twice, regardless of which face (or, for
   the booking form, which inner form/confirmation face) is showing. */
.cal-close{
  position:absolute;top:1rem;right:1.2rem;background:none;border:none;
  font-size:1.4rem;cursor:pointer;color:var(--navy);opacity:0.5;
  transition:opacity 0.2s; z-index:20;
}
.cal-close:hover{opacity:1;}
.cal-left{flex:1;min-width:260px;max-width:100%;position:relative;}
.cal-msg{
  font-family:'Montserrat',sans-serif;font-size:0.72rem;letter-spacing:0.12em;
  color:var(--blue);margin-bottom:1.25rem;line-height:1.6;
}
.cal-msg a{color:var(--teal);text-decoration:none;font-weight:500;}
.cal-msg a:hover{text-decoration:underline;}
.cal-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.25rem;}
.cal-nav button{
  background:none;border:none;cursor:pointer;font-size:1.1rem;
  color:var(--navy);opacity:0.6;transition:opacity 0.2s;padding:0.25rem 0.5rem;
}
.cal-nav button:hover{opacity:1;}
.cal-nav button:disabled{opacity:0.2;cursor:default;}
.cal-nav h3{
  font-family:'Playfair Display',serif;font-size:1.1rem;color:var(--navy);
}
.cal-grid{
  display:grid;grid-template-columns:repeat(7,1fr);gap:6px;
}
.cal-day-label{
  font-family:'Montserrat',sans-serif;font-size:0.6rem;letter-spacing:0.12em;
  text-transform:uppercase;color:var(--text-mid);text-align:center;
  padding:0.3rem 0;
}
/* Each day cell IS the availability indicator now — a big colored circle
   with the day number inside it, rather than a number plus a tiny
   separate dot underneath. Easier to read at a glance, especially on
   small screens. */
.cal-cell{
  position:relative;
  aspect-ratio:1;display:flex;align-items:center;justify-content:center;
  border-radius:50%;font-family:'Montserrat',sans-serif;font-size:0.95rem;font-weight:600;
  cursor:default;color:var(--text-mid);transition:all 0.2s;
}
.cal-cell.empty{}
.cal-cell.past{opacity:0.3;}
.cal-cell.available{
  background:rgba(60,179,113,0.18);color:var(--navy);
  cursor:pointer;border:2px solid rgba(60,179,113,0.55);
}
.cal-cell.available:hover{background:#3CB371;color:var(--white);}
.cal-cell.unavailable{
  background:rgba(224,88,79,0.12);border:2px solid rgba(224,88,79,0.3);
  cursor:default;
}
.cal-cell.selected{background:var(--navy) !important;color:var(--white) !important;border-color:var(--navy) !important;}
.cal-cell.today{box-shadow:0 0 0 2px var(--blue);}

.cal-legend{
  display:flex;gap:1.25rem;margin-top:1.25rem;
  font-family:'Montserrat',sans-serif;font-size:0.65rem;letter-spacing:0.08em;
  color:var(--text-mid);
}
.cal-legend span{display:flex;align-items:center;gap:0.4rem;}
.dot{width:8px;height:8px;border-radius:50%;display:inline-block;}
.dot-green{background:#3CB371;}
.dot-red{background:#E0584F;}

/* "Book" button — appears bottom-right of the calendar face once a date
   is picked, and flips the card over to the booking form. */
.book-fab{
  display:none; position:absolute; bottom:0; right:0;
  padding:0.65rem 1.4rem; border:none; border-radius:3px; cursor:pointer;
  background:var(--navy); color:var(--white);
  font-family:'Montserrat',sans-serif; font-size:0.72rem; letter-spacing:0.12em;
  text-transform:uppercase; transition:background 0.2s;
}
.book-fab.show{display:block;}
.book-fab:hover{background:var(--blue);}

/* Booking form (back face) */
.book-form-title{
  font-family:'Playfair Display',serif;font-size:1.15rem;color:var(--navy);
  margin-bottom:0.25rem;
  /* Full-width heading at the top of the card, not squeezed beside the
     close button — reserve its width so long titles wrap under the X
     rather than running behind it. */
  padding-right:2.2rem;
}
.book-form-date{
  font-family:'Montserrat',sans-serif;font-size:0.72rem;letter-spacing:0.1em;
  color:var(--teal);margin-bottom:1.25rem;text-transform:uppercase;
  padding-right:2.2rem;
}
.book-form-grid{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;margin-bottom:0.9rem;
}
.book-form-grid.full{grid-template-columns:minmax(0,1fr);}
.book-field{
  /* Grid/flex items default to min-width:auto, which floors their size
     at their content's intrinsic minimum (a <select>'s widest option,
     an unbroken word, etc). That's what let fields push the grid — and
     with it the whole card — wider than the modal on some phone
     browsers. minmax(0,1fr) above plus min-width:0 here lets a field
     actually shrink to fit its column instead. */
  min-width:0;
}
.book-field label{
  display:block;font-family:'Montserrat',sans-serif;font-size:0.65rem;
  letter-spacing:0.1em;text-transform:uppercase;color:var(--text-mid);
  margin-bottom:0.35rem;
}
.book-field input,.book-field select,.book-field textarea{
  width:100%;max-width:100%;padding:0.55rem 0.65rem;border:1px solid rgba(27,46,75,0.2);
  border-radius:3px;font-family:'Space Grotesk',sans-serif;font-size:0.85rem;
  color:var(--navy);background:var(--white);
}
.book-field textarea{resize:vertical;min-height:3.2em;}
.book-form-actions{
  margin-top:auto;display:flex;justify-content:space-between;align-items:center;
  padding-top:1rem;
}
.book-change-date-btn{
  background:none;border:none;cursor:pointer;color:var(--text-mid);
  font-family:'Montserrat',sans-serif;font-size:0.72rem;letter-spacing:0.1em;
  text-transform:uppercase;text-decoration:underline;
}
.book-request-btn{
  padding:0.75rem 1.5rem;border:none;border-radius:3px;cursor:pointer;
  background:var(--teal);color:var(--navy);font-weight:600;
  font-family:'Montserrat',sans-serif;font-size:0.75rem;letter-spacing:0.1em;
  text-transform:uppercase;
}
.book-request-btn:disabled{opacity:0.6;cursor:default;}

/* Booking form ↔ confirmation flip. Nested one level inside .cal-back
   (its own small perspective/flip, independent of the outer
   front↔back flip) so that after a submit, the form visibly flips
   away and is replaced by a clean confirmation face — rather than a
   status banner appearing above a form the visitor can still see and
   edit. */
/* Booking form ↔ confirmation. This is nested *inside* the outer
   calendar↔form 3D flip, and a second rotateY 3D flip nested inside the
   first turned out to be unreliable across browsers — getting
   backface-visibility to compose correctly through two levels of
   rotated ancestors is fiddly, and a small mismatch causes exactly the
   "both faces visible, and mirrored" bug seen in testing. A plain
   opacity crossfade gives the same result (form disappears, a clean
   confirmation takes its place) without any 3D math to get wrong. */
.book-flip{ position:relative; width:100%; flex:1; }
.book-flip-inner{
  position:relative; width:100%;
  display:grid;
}
.book-form-face,.book-confirm-face{
  /* Stacked in the same grid cell (both always present, contributing to
     height) so the card auto-fits whichever face is taller — same
     technique as .tag-flip-inner/.flip-inner elsewhere in this file. */
  grid-area:1 / 1 / 2 / 2;
  display:flex; flex-direction:column; width:100%; min-width:0;
  transition:opacity 0.35s ease;
}
.book-flip-inner.flipped .book-form-face{ opacity:0; pointer-events:none; }
.book-flip-inner:not(.flipped) .book-confirm-face{ opacity:0; pointer-events:none; }
.book-confirm-face{
  align-items:center; justify-content:center; text-align:center;
  gap:1.25rem; padding:1.5rem 0.5rem;
}
.book-confirm-bar{
  font-family:'Montserrat',sans-serif;font-size:0.8rem;letter-spacing:0.04em;
  padding:0.9rem 1.25rem;border-radius:3px;line-height:1.6;max-width:100%;
}
.book-confirm-bar.ok{background:rgba(60,179,113,0.15);color:#1a6b3f;}
.book-confirm-bar.error{background:rgba(224,88,79,0.15);color:#a83232;}
.book-confirm-actions{display:flex;gap:1rem;flex-wrap:wrap;justify-content:center;}

/* Only allow the box to scroll internally on genuinely short viewports —
   everywhere else it should just fit without a scrollbar (the JS-synced
   height in script.js keeps it fitting its content exactly). */
@media (max-height:640px){
  .cal-box{max-height:92vh !important;}
  .cal-front,.cal-back{max-height:92vh;overflow-y:auto;}
}

/* ══════════════════════════════
   SECTION 3 — LINKEDIN
══════════════════════════════ */
.linkedin-card{
  margin-top:2rem;background:rgba(27,46,75,0.06);
  border:1px solid rgba(27,46,75,0.18);border-radius:4px;padding:2rem;
  max-width:440px;display:flex;align-items:center;gap:1.5rem;
  text-decoration:none;transition:all 0.3s ease;
}
.linkedin-card:hover{background:rgba(27,46,75,0.12);transform:translateX(6px);}
.li-icon{width:52px;height:52px;background:#0A66C2;border-radius:10px;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.li-icon svg{width:30px;height:30px;fill:white;}
.li-text h3{font-family:'Playfair Display',serif;font-size:1.1rem;color:var(--navy);margin-bottom:0.25rem;}
.li-text span{font-family:'Montserrat',sans-serif;font-size:0.62rem;letter-spacing:0.15em;color:var(--blue);text-transform:uppercase;}

.mail-row{
  margin-top:1.25rem;display:flex;align-items:center;gap:0.75rem;
  font-family:'Montserrat',sans-serif;font-size:0.75rem;letter-spacing:0.12em;
  color:var(--navy);
}
.mail-row a{color:var(--blue);text-decoration:none;font-weight:500;}
.mail-row a:hover{color:var(--teal);}
.mail-icon{width:36px;height:36px;background:rgba(27,46,75,0.08);border-radius:50%;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.mail-icon svg{width:18px;height:18px;fill:var(--navy);}

/* ══════════════════════════════
   SECTION 5 — NETWORK
══════════════════════════════ */
.network-intro-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:3rem;margin-bottom:3rem;
}
.network-subtitle{
  font-family:'Playfair Display',serif;font-size:1.4rem;font-weight:700;
  color:var(--blue);margin:2rem 0 1rem;
}
.tag-row{
  display:flex;flex-wrap:wrap;gap:0.7rem;margin-top:1.25rem;
  align-items:flex-start;
  /* Centers every wrapped line, including a short final line that
     would otherwise sit flush left on its own (the "tags sometimes on
     one screen" / off-center look on narrower widths). justify-content
     applies per flex line for a wrapping flex container, so this
     centers each row independently. */
  justify-content:center;
}
.tag-row.balanced{
  /* Set to an exact multiple of (chip width + gap) by balanceTagGrid()
     in script.js, so the row wraps into evenly-sized lines (e.g. 3+3
     for 6 chips) instead of however many happen to fit the full
     container width first (e.g. 5+1). Auto margins center a
     fixed-width flex item in its cross axis. */
  margin-inline:auto;
}
.tag{
  font-family:'Montserrat',sans-serif;font-size:0.58rem;letter-spacing:0.16em;
  text-transform:uppercase;color:var(--white);
  display:inline-block;
}
/* Topics with no description: plain flat pill, nothing to flip to so
   no click behaviour attached (see script.js) — sized to match the
   flip-cards below exactly, so every "area of expertise" button is
   the same size regardless of whether it has a description. */
.tag-plain{
  width:203px;height:108px;
  background:var(--navy);border-radius:16px;
  display:flex;align-items:center;justify-content:center;text-align:center;
  padding:0.5rem 0.9rem;
}
/* Topics with a description: a small flip-card — same rotateY
   mechanic as the services .flip-tile, just sized down and rounded
   like the plain chip above, with the light/dark faces swapped:
   front (keyword) is the dark badge already used everywhere else,
   back (explanation) is a light card. Flips on hover (same as
   .flip-tile below) as the primary interaction; the click/keyboard
   toggle (.expanded, via script.js) and :focus-visible stay too, as a
   fallback for touch devices and keyboard navigation where hover
   doesn't apply. */
.tag-item{
  perspective:900px;cursor:pointer;
  width:203px;
}
.tag-item:focus-visible{outline:2px solid var(--teal);outline-offset:2px;border-radius:16px;}
.tag-flip-inner{
  position:relative;width:100%;min-height:108px;
  /* Front and back stacked in the same grid cell (rather than
     position:absolute, which takes both faces out of flow and locks
     the card to a fixed 108px) — the grid row auto-sizes to whichever
     face is taller. A long description on the back no longer overflows
     the box and overlaps whatever sits below it on the page; the chip
     simply grows to fit. */
  display:grid;
  transition:transform 0.5s cubic-bezier(0.4,0,0.2,1);
  transform-style:preserve-3d;
}
.tag-item.expanded .tag-flip-inner,
.tag-item:focus-visible .tag-flip-inner{transform:rotateY(180deg);}
/* See .flip-tile's matching comment below (SECTION — SERVICES) — bare
   CSS :hover removed here too, for the same reason. Hover-preview now
   lives in script.js. */
.tag-front,.tag-back{
  grid-area:1 / 1 / 2 / 2;
  min-height:108px;
  backface-visibility:hidden;
  border-radius:16px;
  display:flex;align-items:center;justify-content:center;text-align:center;
  padding:0.85rem 0.9rem;
}
.tag-front{background:var(--navy);}
.tag-back{
  background:rgba(255,255,255,0.9);border:1px solid rgba(27,46,75,0.12);
  transform:rotateY(180deg);
}
.tag-back p{
  font-family:'Space Grotesk',sans-serif;font-style:italic;font-size:0.66rem;
  line-height:1.35;color:var(--navy);margin:0;max-width:none;
}

/* ══════════════════════════════
   SECTION 6 — ABOUT
══════════════════════════════ */
.team-list{display:flex;flex-direction:column;gap:3.5rem;margin-top:2.5rem;}
.team-member{
  display:flex;gap:2.5rem;align-items:flex-start;
  background:rgba(255,255,255,0.5);border-radius:4px;padding:2rem;
  border:1px solid rgba(27,46,75,0.1);backdrop-filter:blur(4px);
  transition:box-shadow 0.3s;
}
.team-member:hover{box-shadow:0 8px 28px rgba(27,46,75,0.08);}
.member-photo{
  width:130px;height:160px;border-radius:3px;flex-shrink:0;
  object-fit:cover;border:2px solid rgba(78,205,196,0.3);
}
.member-photo-placeholder{
  width:130px;height:160px;border-radius:3px;flex-shrink:0;
  background:linear-gradient(145deg,var(--blue) 0%,var(--teal) 100%);
  border:2px solid rgba(78,205,196,0.3);
  display:flex;align-items:center;justify-content:center;
  font-family:'Playfair Display',serif;font-size:3rem;color:rgba(255,255,255,0.6);
}
.member-info{display:flex;flex-direction:column;gap:0.5rem;}
.member-name{font-family:'Playfair Display',serif;font-size:1.5rem;font-weight:700;color:var(--navy);}
.member-title{font-family:'Montserrat',sans-serif;font-size:0.65rem;letter-spacing:0.22em;text-transform:uppercase;color:var(--blue);margin-bottom:0.5rem;}
.member-bio{font-family:'Space Grotesk',sans-serif;font-style:italic;color:var(--text-mid);line-height:1.8;font-size:0.93rem;max-width:560px;}
.member-links{display:flex;gap:1rem;margin-top:0.75rem;flex-wrap:wrap;}
.member-link{
  font-family:'Montserrat',sans-serif;font-size:0.62rem;letter-spacing:0.14em;
  text-transform:uppercase;color:var(--blue);text-decoration:none;
  display:inline-flex;align-items:center;gap:0.35rem;transition:color 0.2s;
}
.member-link:hover{color:var(--teal);}

/* ── FOOTER ── */
footer{
  margin-left:0;padding:2rem 5rem;
  border-top:1px solid rgba(27,46,75,0.15);
  display:flex;align-items:center;justify-content:space-between;
  background:rgba(168,218,220,0.6);
}
footer span{font-family:'Montserrat',sans-serif;font-size:0.6rem;letter-spacing:0.15em;color:var(--text-mid);text-transform:uppercase;}
footer a{color:var(--blue);text-decoration:none;}
footer a:hover{color:var(--teal);}

/* Stock photo helper */
.stock-img{
  width:195px;height:240px;flex-shrink:0;
  object-fit:cover;border:2px solid rgba(78,205,196,0.3);
  background:linear-gradient(145deg,#3A5A8C,#4ECDC4);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  /* Frame shape driven by --frame-roundness (0-100, set from
     SiteSettings.photo_frame_roundness via the CMS slider — see
     index.html). Only the top-right and bottom-left corners round;
     top-left and bottom-right stay perfectly square at every value,
     per request. At 0 this is the original plain rectangle. */
  border-radius:
    0 calc(var(--frame-roundness, 0) * 0.5%)
    0 calc(var(--frame-roundness, 0) * 0.5%);
  transition:border-radius 0.3s ease;
}
.stock-img img{width:100%;height:100%;object-fit:cover;display:block;}
.stock-img a{display:block;width:100%;height:100%;}
.stock-img-placeholder{width:100%;height:100%;background:linear-gradient(135deg,#1B2E4B,#4ECDC4);opacity:0.25;}

/* ══════════════════════════════
   SECTION — SERVICES
══════════════════════════════ */
.services-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem;
  margin-top:2.5rem;
}
.flip-tile{
  perspective:1200px;cursor:pointer;
}
.flip-inner{
  position:relative;width:100%;min-height:170px;
  /* Same fix as .tag-flip-inner above: grid-stacked faces so the tile
     auto-sizes to whichever face (front or back) needs more room,
     instead of clipping/overflowing at a fixed 170px. */
  display:grid;
  transition:transform 0.6s cubic-bezier(0.4,0,0.2,1);
  transform-style:preserve-3d;
}
.flip-tile.flipped .flip-inner,
.flip-tile:focus-visible .flip-inner{transform:rotateY(180deg);}
.flip-front,.flip-back{
  grid-area:1 / 1 / 2 / 2;
  min-height:170px;
  backface-visibility:hidden;
  border-radius:4px;padding:1.5rem;
  display:flex;align-items:center;justify-content:center;text-align:center;
}
.flip-front{
  background:rgba(255,255,255,0.55);border:1px solid rgba(27,46,75,0.12);
  backdrop-filter:blur(4px);
}
.flip-front h3{
  font-family:'Playfair Display',serif;font-size:1.1rem;font-weight:700;
  color:var(--navy);line-height:1.35;
}
.flip-back{
  background:var(--navy);transform:rotateY(180deg);
}
.flip-back p{
  font-family:'Space Grotesk',sans-serif;font-style:italic;font-size:0.85rem;
  line-height:1.6;color:var(--mist);max-width:none;
}
/* Hover-preview used to live here as a bare CSS :hover rule. Removed:
   it ran independently of the .flipped class JS toggles below, so
   clicking a tile while still hovering it (the normal way anyone
   clicks anything) left :hover silently overriding the class change
   until the mouse moved away — looked exactly like a second click
   "doing nothing". Touch browsers that simulate a lingering :hover
   after a tap hit the same masking. Hover-preview is now handled in
   script.js via real mouseenter/mouseleave events instead, so there's
   only ever one thing deciding whether a tile is flipped. */

/* ══════════════════════════════
   SECTION — OUR PARTNERS
══════════════════════════════ */
.partner-people-grid{
  display:grid;
  /* Caps at 4 columns on wide screens: the column minimum scales up to
     whatever width makes exactly 4 fit (accounting for the 3 gaps
     between them), so a 5th can never squeeze onto the same row, while
     still shrinking/wrapping normally on narrower viewports (further
     capped by the max-width:900px/600px overrides below). */
  grid-template-columns:repeat(auto-fit, minmax(max(190px, calc((100% - 3*1.5rem) / 4)), 1fr));
  gap:1.5rem;margin-top:2.5rem;
}
.partner-person{
  background:rgba(255,255,255,0.5);border:1px solid rgba(27,46,75,0.1);
  border-radius:4px;padding:1.25rem;backdrop-filter:blur(4px);
  display:flex;flex-direction:column;gap:0.5rem;
  transition:box-shadow 0.3s;
}
.partner-person:hover{box-shadow:0 8px 24px rgba(27,46,75,0.08);}
.pp-img{
  /* 1.5x smaller than a full-width photo: shrink to 2/3 width and
     center it in the card, rather than filling the card edge to edge. */
  width:66.667%;margin:0 auto;aspect-ratio:1/1;overflow:hidden;
  border:2px solid rgba(78,205,196,0.3);
  background:linear-gradient(145deg,#3A5A8C,#4ECDC4);
  /* Same rounding treatment as .stock-img (About Us), driven by the
     same --frame-roundness CMS slider, instead of a flat 3px radius. */
  border-radius:
    0 calc(var(--frame-roundness, 0) * 0.5%)
    0 calc(var(--frame-roundness, 0) * 0.5%);
  transition:border-radius 0.3s ease;
}
.pp-img img{width:100%;height:100%;object-fit:cover;display:block;}
.pp-img-icon{display:flex;align-items:center;justify-content:center;}
.pp-name{font-family:'Playfair Display',serif;font-size:1.1rem;font-weight:700;color:var(--navy);}
.pp-subtitle{font-family:'Montserrat',sans-serif;font-size:0.6rem;letter-spacing:0.16em;text-transform:uppercase;color:var(--blue);}
.pp-info{font-family:'Space Grotesk',sans-serif;font-style:italic;font-size:0.8rem;line-height:1.6;color:var(--text-mid);max-width:none;}

/* ══════════════════════════════
   SECTION — THE LATEST FROM US
══════════════════════════════ */
.latest-subtitle{
  font-family:'Playfair Display',serif;font-size:1.3rem;font-weight:700;
  color:var(--blue);margin:2.5rem 0 1.25rem;
}
.news-grid,.podcast-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:1.25rem;
}
.news-card,.podcast-card{
  background:rgba(255,255,255,0.55);border:1px solid rgba(27,46,75,0.12);
  border-radius:3px;padding:1.5rem;backdrop-filter:blur(4px);
  transition:transform 0.3s ease,box-shadow 0.3s ease;
  /* .news-card is sometimes rendered as <a> (news item links to a News
     object or an external URL — see section_latest.html) rather than a
     plain <div>; reset the browser's default link styling so a linked
     card looks identical to a non-linked one, and only the whole-card
     hover/pointer signals it's clickable. */
  display:block;text-decoration:none;color:inherit;
}
.news-card:hover,.podcast-card:hover{transform:translateY(-4px);box-shadow:0 12px 32px rgba(27,46,75,0.1);}
.news-date{font-family:'Montserrat',sans-serif;font-size:0.6rem;letter-spacing:0.14em;text-transform:uppercase;color:var(--teal);}
.news-card h3,.podcast-card h3{
  font-family:'Playfair Display',serif;font-size:1.02rem;font-weight:700;
  color:var(--navy);margin:0.5rem 0;line-height:1.35;
}
.news-card p,.podcast-card p{font-family:'Space Grotesk',sans-serif;font-style:italic;font-size:0.82rem;color:var(--text-mid);line-height:1.6;max-width:none;}
.podcast-ep{font-family:'Montserrat',sans-serif;font-size:0.6rem;letter-spacing:0.14em;text-transform:uppercase;color:var(--blue);}
.podcast-player{width:100%;margin-top:0.85rem;height:34px;}
.castopod-link{
  display:inline-block;margin-top:1.5rem;
  font-family:'Montserrat',sans-serif;font-size:0.72rem;font-weight:500;
  letter-spacing:0.08em;color:var(--blue);text-decoration:none;
}
.castopod-link:hover{color:var(--teal);}

@media(max-width:900px){
  nav{padding:1rem 1.5rem;}
  nav .nav-logo{padding-right:1rem;margin-right:0.5rem;}
  nav ul li a{padding:0.55rem 0.45rem;font-size:0.6rem;letter-spacing:0.12em;}
  section{padding:5rem 2.5rem;}
  .network-intro-grid{grid-template-columns:1fr;}
  #mission{display:block;padding-top:7rem;}
  .infinity-wrap{width:80vw;max-width:380px;max-height:none;margin:0 auto 2.5rem;}
  .mission-content{max-width:80%;}
  .services-grid{grid-template-columns:repeat(2,1fr);}
}
@media(max-width:600px){
  nav{padding:0.85rem 1.25rem;justify-content:center;flex-wrap:wrap;}
  nav .nav-logo{border-right:none;padding-right:0;margin-right:0;margin-bottom:0.5rem;width:100%;justify-content:center;}
  nav ul{justify-content:center;flex-wrap:wrap;}
  section{padding:4rem 1.5rem;}
  .team-member{flex-direction:column;}
  .cal-box{width:92vw;}
  .cal-left{min-width:0;}
  .cal-front,.cal-back{padding:1.75rem 1.25rem;}
  .book-form-title,.book-form-date{padding-right:1.9rem;}
  .book-form-grid{grid-template-columns:minmax(0,1fr);}
  .services-grid{grid-template-columns:1fr;}
  .partner-people-grid{grid-template-columns:repeat(2,1fr);}
}
