/* ==========================================================================
   MATLA — Gateway landing page  ·  "Wills, Estates & Trusts"
   Editorial cream backdrop with the family photograph anchored RIGHT.
   All live content lives on the LEFT so the family is never obscured.
   Vanilla CSS. No libraries. Mobile-first-aware, heavily animated.
   ========================================================================== */

:root {
  /* Warm paper / editorial neutrals */
  --paper:        #ECE6DA;
  --paper-bright: #F5F0E7;
  --paper-warm:   #E2D8C7;
  --ink:          #2A251E;
  --ink-soft:     #574F44;
  --stone:        #8B8273;
  --stone-light:  #B6AC9A;
  --tan:          #A98B63;
  --tan-bright:   #C7A877;
  --line:         rgba(42, 37, 30, .14);

  /* Brand — Matla Core (navy) */
  --navy:        #1E3666;
  --navy-deep:   #18294D;
  --steel:       #6E7C99;
  --steel-light: #B9C3D6;

  /* Brand — Matla X (gold) */
  --gold:        #C9A24B;
  --gold-bright: #E9C46A;
  --champagne:   #F4E4BC;
  --gold-deep:   #8C6D2F;

  --font-serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-ui:    "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body:  "Inter", "Segoe UI", system-ui, sans-serif;

  --radius:    16px;
  --radius-lg: 20px;
  --shadow-card:  0 22px 50px -26px rgba(42, 33, 18, .55);
  --shadow-soft:  0 14px 34px -20px rgba(42, 33, 18, .45);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io:  cubic-bezier(.62, .04, .2, 1);

  --col-w: min(640px, 100%);
}

/* Registered so the conic border-beam angle can be animated via @keyframes */
@property --gw-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Accessible skip link --------------------------------------------------- */
.gw-skip {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: .7rem 1.3rem;
  border-radius: 0 0 14px 14px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: .9rem;
  transition: top .25s var(--ease-out);
}
.gw-skip:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ==========================================================================
   BACKDROP
   ========================================================================== */
.gw-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--paper);
}

.gw-bg__frame { position: absolute; inset: 0; overflow: hidden; }

.gw-bg__img {
  position: absolute;
  inset: -3%;
  width: 106%;
  height: 106%;
  object-fit: cover;
  object-position: right center;
  transform: translate3d(var(--bg-px, 0), var(--bg-py, 0), 0) scale(1.05);
  will-change: transform;
  animation: gw-kenburns 42s var(--ease-io) infinite alternate;
}
@keyframes gw-kenburns {
  from { scale: 1.045; }
  to   { scale: 1.13; }
}

/* Warm radial glow that breathes behind the family */
.gw-bg__glow {
  position: absolute;
  top: 50%;
  right: 8%;
  width: 60vmax;
  height: 60vmax;
  transform: translate(0, -50%);
  background: radial-gradient(closest-side,
      rgba(244, 228, 188, .42) 0%,
      rgba(233, 196, 106, .14) 42%,
      transparent 72%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: gw-breathe 9s ease-in-out infinite;
  translate: var(--glow-px, 0) var(--glow-py, 0);
}
@keyframes gw-breathe {
  0%, 100% { opacity: .7;  transform: translate(0, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(0, -50%) scale(1.08); }
}

/* The signature move: a cream wash that dissolves the photo on the LEFT,
   hiding the baked-in text and seating the content. */
.gw-bg__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(96deg,
      var(--paper) 0%,
      var(--paper) 26%,
      rgba(236, 230, 218, .96) 38%,
      rgba(236, 230, 218, .72) 48%,
      rgba(236, 230, 218, .34) 56%,
      transparent 68%),
    radial-gradient(120% 120% at 14% 30%, rgba(245, 240, 231, .5), transparent 60%);
}

/* Soft floor + top wash to settle the photo into the page */
.gw-bg__floor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(236, 230, 218, .4) 0%, transparent 20%),
    linear-gradient(0deg, rgba(228, 216, 199, .55) 0%, transparent 26%);
}

/* Slow diagonal light sweep */
.gw-bg__sweep {
  position: absolute;
  top: -40%;
  left: -50%;
  width: 55%;
  height: 180%;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(255, 252, 244, .0) 40%,
    rgba(255, 250, 235, .5) 50%,
    rgba(255, 252, 244, .0) 60%,
    transparent 100%);
  transform: rotate(8deg);
  filter: blur(10px);
  mix-blend-mode: soft-light;
  animation: gw-sweep 15s var(--ease-io) infinite;
}
@keyframes gw-sweep {
  0%   { transform: translateX(0) rotate(8deg); opacity: 0; }
  10%  { opacity: 1; }
  55%  { opacity: 1; }
  72%, 100% { transform: translateX(420%) rotate(8deg); opacity: 0; }
}

/* Fine grain for an analogue, printed feel */
.gw-bg__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  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%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.gw-motes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .9;
}

/* Oversized decorative ampersand watermark */
.gw-amp {
  position: fixed;
  z-index: 1;
  right: 4vw;
  top: 50%;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28rem, 52vw, 60rem);
  line-height: .7;
  color: rgba(42, 37, 30, .045);
  transform: translateY(-50%);
  translate: var(--amp-px, 0) var(--amp-py, 0);
  pointer-events: none;
  user-select: none;
  animation: gw-amp-float 18s ease-in-out infinite;
}
@keyframes gw-amp-float {
  0%, 100% { transform: translateY(-50%) rotate(0deg); }
  50%      { transform: translateY(-52%) rotate(-2deg); }
}

/* ==========================================================================
   INTRO SEQUENCE
   ========================================================================== */
.gw-intro {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background:
    radial-gradient(80% 80% at 50% 46%, rgba(245, 240, 231, .9) 0%, rgba(226, 214, 197, .98) 70%);
  transition: opacity .7s var(--ease-out), visibility .7s;
}
body.gw-intro-done .gw-intro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.gw-intro__inner { text-align: center; transform: translateY(-2%); }

.gw-intro__mark { width: clamp(72px, 11vw, 116px); height: auto; margin: 0 auto .9rem; display: block; }
.gw-intro__chev {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  filter: drop-shadow(0 6px 14px rgba(201, 162, 75, .35));
  animation: gw-draw 1s var(--ease-out) forwards;
}
.gw-intro__chev--2 { stroke: var(--steel); animation-delay: .22s; opacity: .9; }
@keyframes gw-draw { to { stroke-dashoffset: 0; } }

.gw-intro__logo {
  display: block;
  width: clamp(208px, 46vw, 420px);
  aspect-ratio: 683 / 94;
  margin: 0 auto;
  -webkit-mask: url("assets/logos/matla-text.png") center / contain no-repeat;
  mask: url("assets/logos/matla-text.png") center / contain no-repeat;
  background: linear-gradient(100deg,
      var(--gold-deep) 0%, var(--gold) 26%, var(--tan-bright) 46%,
      #6b5526 54%, var(--gold) 70%, var(--gold-deep) 100%);
  opacity: 0;
  transform: translateY(24px) scale(.92);
  filter: drop-shadow(0 8px 22px rgba(140, 109, 47, .3));
  animation: gw-logo-in .9s var(--ease-out) .55s forwards;
}
@keyframes gw-logo-in { to { opacity: 1; transform: translateY(0) scale(1); } }

.gw-intro__tag {
  margin: 1.1rem 0 0;
  font-family: var(--font-ui);
  font-size: clamp(.78rem, 2.4vw, .98rem);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--tan);
  opacity: 0;
  animation: gw-fade-up .9s var(--ease-out) 1.2s forwards;
}
@keyframes gw-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: .9; transform: translateY(0); }
}

/* ==========================================================================
   LAYOUT — left content column
   ========================================================================== */
.gw {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(1.1rem, 3.6vh, 2.3rem) clamp(1.25rem, 5.5vw, 5rem);
}
.gw-col {
  width: var(--col-w);
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(.6rem, 1.7vh, 1.05rem);
}

/* Entrance reveal primitive */
[data-reveal] { opacity: 0; transform: translateY(26px); }
body.gw-reveal [data-reveal] {
  animation: gw-rise .9s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes gw-rise { to { opacity: 1; transform: translateY(0); } }

/* ---------- Brand lockup (Matla X footer logo) ---------- */
.gw-lockup {
  display: flex;
  align-items: center;
  gap: .9rem;
  opacity: 0;
  transform: translateY(18px);
}
body.gw-reveal .gw-lockup { animation: gw-rise .8s var(--ease-out) .02s forwards; }

.gw-mark { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.gw-mark__chev { width: 46px; height: auto; overflow: visible; }
.gw-mark__chev1, .gw-mark__chev2 {
  fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 240; stroke-dashoffset: 240;
}
body.gw-reveal .gw-mark__chev1 { animation: gw-draw .9s var(--ease-out) .35s forwards; }
body.gw-reveal .gw-mark__chev2 { animation: gw-draw .9s var(--ease-out) .5s forwards; }
.gw-mark__chev1 { stroke: var(--gold); filter: drop-shadow(0 3px 8px rgba(201, 162, 75, .4)); }
.gw-mark__chev2 { stroke: var(--steel); opacity: .85; }

.gw-mark__word {
  display: block;
  width: 150px;
  aspect-ratio: 683 / 94;
  -webkit-mask: url("assets/logos/matla-text.png") left center / contain no-repeat;
  mask: url("assets/logos/matla-text.png") left center / contain no-repeat;
  background: linear-gradient(100deg,
      var(--gold-deep) 0%, var(--gold) 24%, var(--tan-bright) 44%,
      #6b5526 52%, var(--gold) 72%, var(--gold-deep) 100%);
  background-size: 220% 100%;
  filter: drop-shadow(0 4px 12px rgba(140, 109, 47, .25));
  animation: gw-word-sheen 7s linear infinite;
}
@keyframes gw-word-sheen {
  from { background-position: 0% 0; }
  to   { background-position: -220% 0; }
}

.gw-lockup__rule {
  flex: 1;
  height: 1px;
  max-width: 64px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.gw-lockup__sub {
  font-family: var(--font-ui);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--stone);
  white-space: nowrap;
}

/* ---------- Hero copy ---------- */
.gw-hero { display: flex; flex-direction: column; gap: clamp(.45rem, 1.1vh, .72rem); }

.gw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(.7rem, 1.6vw, .8rem);
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--tan);
}
.gw-eyebrow__dot {
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(201, 162, 75, .18);
  animation: gw-pulse 3.2s ease-in-out infinite;
}
@keyframes gw-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(201, 162, 75, .18); }
  50%      { box-shadow: 0 0 0 7px rgba(201, 162, 75, .05); }
}

.gw-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -.01em;
  color: var(--ink);
  font-size: clamp(2.3rem, 5.6vw, 3.9rem);
}
.gw-title__line { display: block; }
.gw-title__line[data-reveal] {
  opacity: 0;
  transform: translateY(.55em);
  filter: blur(6px);
}
body.gw-reveal .gw-title__line[data-reveal] {
  animation: gw-line-in 1s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes gw-line-in {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.gw-title__line--accent {
  position: relative;
  font-style: italic;
  font-weight: 500;
  color: var(--tan);
  background: linear-gradient(92deg, var(--tan) 0%, var(--tan-bright) 45%, #7d6034 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  width: fit-content;
  overflow: hidden;
}
.gw-title__shine {
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 35%;
  background: linear-gradient(100deg, transparent, rgba(255, 248, 230, .85), transparent);
  transform: skewX(-16deg);
  -webkit-text-fill-color: initial;
  mix-blend-mode: screen;
  animation: gw-title-shine 6.5s var(--ease-io) 2s infinite;
}
@keyframes gw-title-shine {
  0%   { left: -45%; }
  22%  { left: 130%; }
  100% { left: 130%; }
}

.gw-title__line--small {
  margin-top: .35rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  letter-spacing: 0;
  color: var(--ink-soft);
}

.gw-lede {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(.92rem, 1.8vw, 1.02rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ==========================================================================
   CHOICE CARDS  (stacked, kept entirely within the left column)
   ========================================================================== */
.gw-choices {
  display: flex;
  flex-direction: row;
  gap: .7rem;
  margin-top: .1rem;
}

.gw-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: clamp(.85rem, 1.5vw, 1.1rem) clamp(.95rem, 1.5vw, 1.25rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 253, 248, .68);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, .7);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  cursor: pointer;
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --ty: 0px;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--ty));
  transition:
    flex-grow .55s var(--ease-out),
    transform .3s var(--ease-out),
    box-shadow .5s var(--ease-out),
    border-color .5s var(--ease-out),
    filter .5s var(--ease-out),
    opacity .5s var(--ease-out),
    background .5s var(--ease-out);
}
/* Children float in Z during the tilt for a parallax, tactile feel */
.gw-card__head, .gw-card__lede, .gw-chips {
  transition: transform .4s var(--ease-out);
  transform: translateZ(0);
}
.gw-card:hover .gw-card__head  { transform: translateZ(34px); }
.gw-card:hover .gw-card__lede  { transform: translateZ(20px); }
.gw-card:hover .gw-chips       { transform: translateZ(26px); }
.gw-card::before {
  /* colour wash that warms on hover */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity .5s var(--ease-out);
}
.gw-card--core::before { background: linear-gradient(100deg, rgba(30, 54, 102, .12), transparent 70%); }
.gw-card--x::before    { background: linear-gradient(100deg, rgba(201, 162, 75, .16), transparent 70%); }
.gw-card:hover::before,
.gw-card:focus-visible::before { opacity: 1; }

@media (hover: hover) and (pointer: fine) {
  .gw-card:hover { --ty: -6px; }
  /* Split-portal: the hovered card expands while its sibling yields focus */
  .gw-choices:hover .gw-card { flex-grow: .78; filter: saturate(.92) brightness(.985); opacity: .9; }
  .gw-choices:hover .gw-card:hover { flex-grow: 1.55; filter: none; opacity: 1; }
}
.gw-card:focus-visible { --ty: -6px; }
/* Keyboard focus mirrors the expand on pointer devices */
@media (hover: hover) and (pointer: fine) {
  .gw-choices:focus-within .gw-card { flex-grow: .78; filter: saturate(.92) brightness(.985); opacity: .9; }
  .gw-choices:focus-within .gw-card:focus-visible { flex-grow: 1.55; filter: none; opacity: 1; }
}

/* Cursor-tracking themed spotlight */
.gw-card__spot {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s var(--ease-out);
  background: radial-gradient(240px circle at var(--mx) var(--my), var(--spot), transparent 62%);
}
.gw-card--core { --spot: rgba(30, 54, 102, .17); }
.gw-card--x    { --spot: rgba(201, 162, 75, .24); }
.gw-card:hover .gw-card__spot,
.gw-card:focus-visible .gw-card__spot { opacity: 1; }

/* Animated conic border-beam that travels the card edge on hover */
.gw-card__beam {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  padding: 1.6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s var(--ease-out);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.gw-card--core .gw-card__beam {
  background: conic-gradient(from var(--gw-angle),
      transparent 48%, rgba(110, 124, 153, .15) 68%,
      var(--steel-light) 80%, #ffffff 85%, var(--steel) 90%, transparent 100%);
}
.gw-card--x .gw-card__beam {
  background: conic-gradient(from var(--gw-angle),
      transparent 48%, rgba(233, 196, 106, .15) 68%,
      var(--gold-bright) 80%, #fff7e2 85%, var(--gold) 90%, transparent 100%);
}
.gw-card:hover .gw-card__beam,
.gw-card:focus-visible .gw-card__beam {
  opacity: 1;
  animation: gw-beam 2.8s linear infinite;
}
@keyframes gw-beam { to { --gw-angle: 360deg; } }
.gw-card--core:hover, .gw-card--core:focus-visible {
  border-color: rgba(30, 54, 102, .4);
  box-shadow: 0 28px 56px -28px rgba(30, 54, 102, .55), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.gw-card--x:hover, .gw-card--x:focus-visible {
  border-color: rgba(201, 162, 75, .55);
  box-shadow: 0 28px 56px -26px rgba(201, 162, 75, .6), inset 0 1px 0 rgba(255, 255, 255, .8);
}

/* Accent bar */
.gw-card__bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  border-radius: 5px 0 0 5px;
  transition: width .45s var(--ease-out), filter .45s var(--ease-out);
}
.gw-card--core .gw-card__bar { background: linear-gradient(180deg, var(--steel), var(--navy)); }
.gw-card--x .gw-card__bar    { background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); }
.gw-card:hover .gw-card__bar { width: 8px; filter: brightness(1.1); }

/* Diagonal shine sweep */
.gw-card__shine {
  position: absolute;
  top: 0; left: -130%;
  width: 55%; height: 100%;
  z-index: 2;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
  transition: left .85s var(--ease-out);
  pointer-events: none;
}
.gw-card:hover .gw-card__shine { left: 150%; }

/* Card body */
.gw-card__main { position: relative; z-index: 3; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gw-card__head { display: flex; align-items: center; gap: .6rem; }

.gw-card__chev {
  flex-shrink: 0;
  width: clamp(30px, 4vw, 40px);
}
.gw-card__chev svg { width: 100%; height: auto; display: block; }
.gw-card__chev path {
  fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 130; stroke-dashoffset: 0;
}
.gw-card--core .gw-card__chev path { stroke: var(--navy); }
.gw-card--x .gw-card__chev path { stroke: var(--gold-deep); }
.gw-card:hover .gw-card__chev path,
.gw-card:focus-visible .gw-card__chev path { animation: gw-chev-redraw .7s var(--ease-out); }
@keyframes gw-chev-redraw { 0% { stroke-dashoffset: 130; } 100% { stroke-dashoffset: 0; } }

.gw-card__kicker {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.gw-card--core .gw-card__kicker { color: var(--navy); }
.gw-card--x .gw-card__kicker { color: var(--gold-deep); }

.gw-card__title {
  display: block;
  margin-top: .12rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.08;
  color: var(--ink);
  /* Reserve two lines so the title's height never changes with card width */
  min-height: 2.16em;
}
.gw-card__lede {
  /* Clamp to a fixed three lines so width changes can't grow the card's height
     (this is what keeps the split-portal expand purely horizontal). */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
          line-clamp: 3;
  overflow: hidden;
  margin-top: .45rem;
  min-height: 4.5em;
  font-size: clamp(.84rem, 1.7vw, .92rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Chips wrap within a fixed two-row area — text never clips, height stays fixed */
.gw-chips {
  display: flex; flex-wrap: wrap; align-content: flex-start;
  gap: .4rem; margin-top: .6rem;
  min-height: 3.1rem; max-height: 3.1rem; overflow: hidden;
}
.gw-chip {
  display: inline-block;
  padding: .26rem .6rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .03em;
  white-space: nowrap;
}
.gw-card--core .gw-chip { background: rgba(30, 54, 102, .08); color: var(--navy); border: 1px solid rgba(30, 54, 102, .16); }
.gw-card--x .gw-chip { background: rgba(201, 162, 75, .12); color: var(--gold-deep); border: 1px solid rgba(201, 162, 75, .28); }

/* Go button (circular arrow) */
.gw-card__go {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  align-self: flex-end;
  margin-top: auto;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: .5rem;
  will-change: transform;
}
.gw-card__golabel {
  font-family: var(--font-ui);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--stone);
  transition: color .4s var(--ease-out);
}
.gw-card__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 5vw, 50px);
  height: clamp(40px, 5vw, 50px);
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, .5);
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out), transform .4s var(--ease-out);
}
.gw-card__arrow svg { width: 46%; height: 46%; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s var(--ease-out), transform .4s var(--ease-out); }
.gw-card--core:hover .gw-card__arrow { background: var(--navy); border-color: var(--navy); }
.gw-card--x:hover .gw-card__arrow { background: linear-gradient(100deg, var(--gold-bright), var(--gold)); border-color: var(--gold); }
.gw-card:hover .gw-card__arrow svg { stroke: #fff; transform: translateX(2px); }
.gw-card--x:hover .gw-card__arrow svg { stroke: var(--ink); }
.gw-card:hover .gw-card__golabel { color: var(--ink); }

/* "New" ribbon on Matla X */
.gw-card__ribbon {
  position: absolute;
  top: .85rem; right: -2.6rem;
  z-index: 4;
  width: 9rem;
  padding: .28rem 0;
  text-align: center;
  transform: rotate(38deg);
  background: linear-gradient(100deg, var(--gold-bright), var(--gold-deep));
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px -8px rgba(140, 109, 47, .8);
}

/* ==========================================================================
   BASE — creed line + trust stats
   ========================================================================== */
.gw-base { margin-top: .15rem; }

.gw-creed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .8rem;
  margin: 0 0 .7rem;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(.66rem, 1.5vw, .78rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.gw-creed__word { opacity: 0; animation: gw-fade-up .7s var(--ease-out) forwards; }
body.gw-reveal .gw-creed__word:nth-of-type(1) { animation-delay: .85s; }
body.gw-reveal .gw-creed__word:nth-of-type(3) { animation-delay: 1s; }
body.gw-reveal .gw-creed__word:nth-of-type(5) { animation-delay: 1.15s; }
.gw-creed__dot { color: var(--gold); font-size: .6em; animation: gw-pulse 3s ease-in-out infinite; }

.gw-stats {
  list-style: none;
  margin: 0 0 .7rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(.8rem, 3vw, 1.8rem);
}
.gw-stat { display: flex; flex-direction: column; gap: .12rem; }
.gw-stat__num {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.gw-stat__label {
  font-family: var(--font-ui);
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stone);
}
.gw-stat--sep { align-self: center; }
.gw-stat__sep { display: block; width: 1px; height: 26px; background: linear-gradient(180deg, transparent, var(--line), transparent); }

.gw-fine {
  margin: 0;
  font-family: var(--font-ui);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--stone);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Wide desktops — let the column breathe, keep family clear */
@media (min-width: 1500px) {
  .gw { padding-inline: clamp(5rem, 9vw, 11rem); }
  :root { --col-w: 660px; }
}

/* Tablet — soften the scrim split, slightly narrower column */
@media (max-width: 1100px) {
  .gw-bg__scrim {
    background:
      linear-gradient(96deg,
        var(--paper) 0%, var(--paper) 22%,
        rgba(236, 230, 218, .95) 40%,
        rgba(236, 230, 218, .6) 54%,
        rgba(236, 230, 218, .2) 64%, transparent 76%),
      radial-gradient(120% 120% at 12% 30%, rgba(245, 240, 231, .5), transparent 60%);
  }
}

/* ==========================================================================
   MOBILE REDESIGN — two-zone layout
   TOP zone  : family photo shows as a cinematic frame (controlled by padding-top)
   BOTTOM zone: cream content area — logo → heading → cards → stats
   Cards keep the same vertical column shape as desktop; choices are stacked.
   ========================================================================== */

/* --- Background + layout base (all phones ≤820px) ----------------------- */
@media (max-width: 820px) {
  /* Photo anchors near top; richer scrim creates a clean content zone */
  .gw-bg__img { object-position: center 14%; }
  .gw-bg__scrim {
    background: linear-gradient(180deg,
      rgba(236,230,218,.06) 0%,
      rgba(236,230,218,.30) 26%,
      rgba(236,230,218,.88) 40%,
      var(--paper)          51%,
      var(--paper)          100%);
  }
  .gw-bg__floor { background: linear-gradient(0deg, rgba(228,216,199,.55) 0%, transparent 28%); }
  .gw-bg__glow  { top: 18%; right: 50%; transform: translate(50%,-50%); width: 88vw; height: 88vw; }
  .gw-amp       { font-size: 28rem; right: -5vw; top: 14%; opacity: .4; }

  /* Content flows from below the photo (no bottom-anchor — avoids height unpredictability) */
  .gw {
    align-items:    flex-start;
    padding-top:    clamp(190px, 30vh, 250px);
    padding-bottom: clamp(1.5rem, 3vh, 2.2rem);
    padding-inline: clamp(1.1rem, 5vw, 2rem);
  }
  .gw-col    { width: 100%; margin-right: 0; gap: clamp(.55rem, 1.5vh, .85rem); }
  .gw-lockup { justify-content: flex-start; }
}

/* --- Cards — vertical column layout (same as desktop), stacked ---------- */
@media (max-width: 820px) {
  .gw-choices { flex-direction: column; gap: .5rem; }

  /* Kill preserve-3d: overflow:hidden + preserve-3d causes children to
     paint behind the card background in Chrome/WebKit */
  .gw-card {
    transform:       none !important;
    transform-style: flat !important;
  }
  .gw-card__head,
  .gw-card__lede,
  .gw-chips { transform: none !important; transition: none; }

  /* Reset the fixed-height guards (needed only for desktop side-by-side expand) */
  .gw-card__title { min-height: 0; }
  .gw-card__lede  { min-height: 0; max-height: none; -webkit-line-clamp: 2; line-clamp: 2; }
  .gw-chips       { min-height: 0; max-height: none; }

  /* Go button: right-aligned row, small fixed gap above */
  .gw-card__go { flex-direction: row; align-self: flex-end; margin-top: .6rem; }

  /* Subtle press feedback on tap */
  .gw-card:active {
    transform: scale(.985) !important;
    transition: transform .08s ease-out !important;
    box-shadow: var(--shadow-soft) !important;
  }

  /* Disable desktop split-portal expand on touch */
  .gw-choices:hover .gw-card,
  .gw-choices:hover .gw-card:hover,
  .gw-choices:focus-within .gw-card,
  .gw-choices:focus-within .gw-card:focus-visible { flex-grow: 1; filter: none; opacity: 1; }
}

/* --- Small phones (≤520px): strip non-essentials, keep both cards on screen */
@media (max-width: 520px) {
  /* Shorter photo zone — more room for the two cards */
  .gw { padding-top: clamp(148px, 24vh, 190px); }
  .gw-col { gap: .45rem; }

  /* Slightly smaller Matla brand mark — saves ~14px of vertical space */
  .gw-mark__chev { width: 36px; }
  .gw-mark__word { width: 116px; }

  /* Hide eyebrow + lockup tagline — heading communicates the brand clearly enough */
  .gw-eyebrow              { display: none; }
  .gw-lockup__rule,
  .gw-lockup__sub          { display: none; }

  /* Compact heading — drop the italic subtitle line */
  .gw-title                { font-size: clamp(1.8rem, 8vw, 2.3rem); }
  .gw-title__line--small   { display: none; }

  /* Strip long descriptions */
  .gw-lede                 { display: none; }
  .gw-card__lede           { display: none; }

  /* Compact card proportions */
  .gw-card                 { padding: .9rem 1rem; }
  .gw-card__title          { font-size: clamp(1.05rem, 4.5vw, 1.3rem); }
  .gw-card__kicker         { font-size: .62rem; }
  .gw-chips                { margin-top: .3rem; }

  /* Compact stats strip */
  .gw-stat--sep            { display: none; }
  .gw-stats                { gap: .45rem 1rem; }
}

/* Short landscape — avoid overflow */
@media (max-height: 640px) and (min-width: 821px) {
  .gw-card__lede { display: none; }
  .gw-col { gap: .8rem; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .gw-bg__img { animation: none; transform: scale(1.03); translate: 0 0; }
  .gw-bg__glow, .gw-bg__sweep, .gw-mark__word, .gw-amp,
  .gw-eyebrow__dot, .gw-creed__dot, .gw-title__shine { animation: none; }
  .gw-motes { display: none; }
  .gw-intro { display: none !important; }

  [data-reveal], .gw-lockup, .gw-mark__chev1, .gw-mark__chev2,
  .gw-title__line[data-reveal], .gw-creed__word {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
  .gw-card, .gw-card:hover, .gw-card:focus-visible { transform: none; }
  .gw-card__head, .gw-card__lede, .gw-chips { transform: none !important; }
  .gw-card__shine, .gw-card__beam, .gw-card__spot { display: none; }
  .gw-choices:hover .gw-card, .gw-choices:hover .gw-card:hover { flex-grow: 1; filter: none; opacity: 1; }
  * { scroll-behavior: auto !important; }
}
