/* ================================================================
   Glass pages (About, How we deliver)
   The homepage's type and colours, staged darker and more dramatic:
   deep brown sections with slow, glowing colour orbs behind frosted
   glass cards. Shared by every page that loads it; page-specific
   layout lives in each page.
================================================================ */
:root {
  --g-ink: #1A0A04;
  --g-dark: #2B1004;
  --g-red: #963723;
  --g-red-dark: #602114;
  --g-tan: #C08363;
  --g-cream: #FFE8C0;
  --g-grey: #474646;
  --g-paper: #F7F2EE;
  --g-glass: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
  --g-glass-line: rgba(255,255,255,0.22);
  --g-max: 1240px;
}

/* Pages built on this system run edge to edge (no default 8px body margin) */
body { margin: 0; }
.g-page { background: var(--g-ink); color: #FFFFFF; overflow-x: clip; }
.g-page *, .g-page *::before, .g-page *::after { box-sizing: border-box; }
.g-page img { max-width: 100%; height: auto; display: block; }

/* ── Sections ── */
.g-section { position: relative; isolation: isolate; overflow: clip; padding: clamp(96px, 12vw, 190px) 0; }
.g-section--dark  { background: var(--g-dark); }
.g-section--ink   { background: var(--g-ink); }
.g-section--red   { background: var(--g-red); }
.g-section--tan   { background: var(--g-red-dark); } /* calm end CTA: one brown, was var(--g-tan) */
.g-section--light { background: var(--g-paper); color: var(--g-grey); }
.g-wrap { position: relative; z-index: 1; width: min(var(--g-max), 100% - 2 * clamp(20px, 5vw, 64px)); margin: 0 auto; }

/* Glowing colour orbs behind the glass (decorative) */
.g-orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.g-orb {
  position: absolute;
  width: var(--s, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--c, #963723), transparent 68%);
  filter: blur(40px);
  opacity: var(--o, 0.8);
  animation: g-drift var(--t, 22s) ease-in-out infinite alternate;
}
@keyframes g-drift {
  /* translate/scale rather than transform, so a scroll-driven transform
     (data-drift) can move the same element without cancelling this */
  from { translate: 0 0; scale: 1; }
  to   { translate: var(--dx, 60px) var(--dy, -40px); scale: 1.12; }
}
/* A fine grain so the large gradients don't band */
.g-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.g-section--light::after { opacity: 0.035; }

/* ── Glass ── */
.g-glass {
  position: relative;
  background: var(--g-glass);
  border: 1px solid var(--g-glass-line);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 30px 80px rgba(10,3,0,0.35), inset 0 1px 0 rgba(255,255,255,0.28);
}
/* Light sections: the same glass, tinted for a pale background */
.g-section--light .g-glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.75), rgba(255,255,255,0.4));
  border-color: rgba(150,55,35,0.16);
  box-shadow: 0 30px 70px rgba(96,33,20,0.14), inset 0 1px 0 rgba(255,255,255,0.9);
}
.g-card { border-radius: clamp(28px, 3vw, 44px); padding: clamp(28px, 3.4vw, 52px); }

/* ── Type ── */
.g-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #FFFFFF;
}
.g-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--g-cream); box-shadow: 0 0 12px var(--g-cream); }
.g-section--light .g-eyebrow { color: var(--g-red); }
.g-section--light .g-eyebrow::before { background: var(--g-red); box-shadow: 0 0 10px rgba(150,55,35,0.5); }

.g-display {
  margin: 0;
  font-family: 'Alexandria', sans-serif;
  font-weight: 600;
  font-size: clamp(36px, 4.4vw, 64px); /* capped to the homepage hero H1 (64px), everywhere */
  line-height: 0.98;
  letter-spacing: -0.05em;
}
.g-title {
  margin: 0;
  font-family: 'Alexandria', sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 64px); /* section titles never exceed the 64px page title */
  line-height: 1.06;
  letter-spacing: -0.045em;
}
.g-lead {
  margin: 0;
  max-width: 640px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
}
.g-section--light .g-lead { color: #6B5A52; }
.g-body { font-family: 'Google Sans Flex', 'DM Sans', sans-serif; font-weight: 400; font-size: 16px; line-height: 1.7; }
.g-page strong { font-weight: 700; }

/* ── Buttons ──
   One size system, three roles: primary (--cream), secondary (--glass),
   tertiary (--outline, smaller). Desktop 64px/17px, tablet 56px/16px,
   phone 48px/15px; tertiary 48px/15px desktop, 44px/14px from tablet down. */
.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 32px;
  border-radius: 999px;
  font-family: 'Google Sans Flex', 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.g-btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.25s ease; }
.g-btn:hover { transform: translateY(-2px); }
.g-btn:hover svg { transform: translateX(3px); }
.g-btn--cream { background: var(--g-cream); color: var(--g-ink); box-shadow: 0 12px 40px rgba(255,232,192,0.28); }
.g-btn--cream:hover { background: #FFF1D6; box-shadow: 0 16px 50px rgba(255,232,192,0.4); }
.g-btn--glass { color: #FFFFFF; }
.g-btn--glass:hover { border-color: rgba(255,255,255,0.5); }
.g-section--light .g-btn--glass { color: var(--g-red-dark); }
/* Tertiary: small outline pill (the homepage .work-link / team .tm-link look) */
.g-btn--outline {
  min-height: 48px;
  padding: 0 28px;
  font-size: 15px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: #FFFFFF;
}
.g-btn--outline:hover { background: rgba(255,255,255,0.12); }
.g-section--light .g-btn--outline { color: var(--g-red-dark); }
.g-section--light .g-btn--outline:hover { background: rgba(150,55,35,0.08); }
.g-btn:focus-visible, .g-page a:focus-visible { outline: 3px solid #FFD999; outline-offset: 4px; }
.g-section--light a:focus-visible { outline-color: var(--g-red); }
@media (max-width: 1040px) {
  .g-btn { min-height: 56px; padding: 0 32px; font-size: 16px; }
  .g-btn--outline { min-height: 44px; padding: 0 24px; font-size: 14px; }
}

/* ── Photos: black and white, colour on hover (as on the homepage) ── */
.g-photo { position: relative; overflow: hidden; border-radius: clamp(28px, 3.2vw, 56px); box-shadow: 0 40px 90px rgba(10,3,0,0.45); }
.g-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transform: scale(1.02); transition: filter 0.6s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.g-photo:hover img { filter: grayscale(0); transform: scale(1.06); }

/* ── Motion (only when the script is running and motion is allowed) ── */
.g-motion [data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: var(--d, 0s); }
.g-motion [data-reveal].is-in { opacity: 1; transform: none; }
.split-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  filter: blur(8px);
  transition: opacity 0.8s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s ease;
  transition-delay: calc(var(--w) * 75ms);
}
.is-split-in .split-word { opacity: 1; transform: none; filter: none; }
.fill-word { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .g-orb { animation: none; }
  .g-btn, .g-btn svg, .g-photo img { transition: none; }
  .g-btn:hover, .g-btn:hover svg, .g-photo:hover img { transform: none; }
}

/* ── Phones (iPhone 16, 393 wide): about 40% smaller type, with a 14px floor
   for reading text and 12px for small uppercase labels ── */
@media (max-width: 520px) {
  .g-display { font-size: 32px; letter-spacing: -0.04em; }
  .g-title { font-size: 22px; letter-spacing: -0.035em; }
  .g-eyebrow { font-size: 12px; padding: 8px 16px; }
  .g-lead, .g-body { font-size: 14px; }
  .g-card { border-radius: 24px; padding: 22px; }
  .g-btn { min-height: 48px; padding: 0 24px; font-size: 15px; }
  .g-section { padding: 72px 0; }
}

/* ── Card surfaces that don't take their colour from the section ──
   Last in the file on purpose, so they beat .g-section--light .g-glass. */
.g-glass.g-card--white {
  background: linear-gradient(180deg, #FFFFFF, #FDF9F5);
  border: 1px solid rgba(150,55,35,0.16);
  color: var(--g-grey);
  box-shadow: 0 30px 70px rgba(43,18,6,0.22), inset 0 1px 0 rgba(255,255,255,0.9);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.g-card--white .g-btn--cream { box-shadow: inset 0 0 0 1px rgba(150,55,35,0.25), 0 10px 26px rgba(150,55,35,0.16); }
.g-card--white .g-btn:focus-visible,
.g-card--white a:focus-visible { outline-color: var(--g-red); }

/* Dark brown card, the same surface as the nav bar */
.g-glass.g-card--dark {
  background: linear-gradient(180deg, rgba(43,18,6,0.97), rgba(43,18,6,0.9));
  border: 1px solid rgba(255,255,255,0.1);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255,232,192,0.06), 0 30px 70px rgba(20,6,0,0.35);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
}
.g-card--dark .g-eyebrow { color: #FFFFFF; }
.g-card--dark .g-eyebrow::before { background: var(--g-cream); box-shadow: 0 0 12px var(--g-cream); }
.g-card--dark .g-title { color: #FFFFFF; }
.g-card--dark .g-lead { color: rgba(255,255,255,0.78); }
.g-card--dark .g-btn--glass { color: #FFFFFF; }
.g-card--dark .g-btn--glass:hover { border-color: rgba(255,255,255,0.5); }
.g-card--dark .g-btn:focus-visible,
.g-card--dark a:focus-visible { outline-color: #FFD999; }
.g-card--dark .g-glass {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.g-card--dark .g-btn--glass.g-glass:hover { background: rgba(255,255,255,0.12); }
