/* =====================================================================
   YMT Group Limited
   Palette built out from the slate blue in the logo, deepened so the blue
   carries real surfaces rather than just accents. The site commits to a
   light-with-blue-bands treatment: the logo is dark line work with no light
   variant, so it only ever sits on a pale ground.
   ===================================================================== */

:root {
  --blue-900: #0c2840;   /* hero and experience bands */
  --blue-800: #123a5a;   /* contact band */
  --blue-600: #1d5c86;
  --blue-500: #2c6b8f;   /* links */
  --blue-200: #a8c6db;   /* text on blue */
  --blue-100: #e4edf4;   /* pale wash */

  --ink:    #16202a;
  --body:   #46566a;
  --muted:  #7f8d9c;
  --rule:   #dde3ea;
  --paper:  #ffffff;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text:    "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --wrap: 1080px;
  --gut: clamp(20px, 5vw, 48px);

  /* "only light" — not just "light" — is what opts the page out of
     Chrome's Auto Dark Theme. There is no dark variant of this design. */
  color-scheme: only light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--text);
  font-size: 17.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
svg { max-width: 100%; }
a { color: var(--blue-500); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.skip { position: absolute; left: -9999px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ----------------------------- type ----------------------------- */

h1, h2 { font-family: var(--display); color: var(--ink); margin: 0; line-height: 1.1;
         letter-spacing: -.022em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 600; color: #fff; }
p { margin: 0 0 1.15em; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

.label {
  font-family: var(--display); font-weight: 600; font-size: .74rem;
  letter-spacing: .17em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 1rem;
}
.label--light { color: var(--blue-200); }

.statement { font-family: var(--display); font-weight: 500; color: var(--ink);
             font-size: clamp(1.16rem, 2vw, 1.45rem); line-height: 1.42;
             letter-spacing: -.012em; max-width: 44ch; }
.statement--light { color: #fff; }
.muted { color: var(--muted); font-size: .92rem; }

/* ----------------------------- header ----------------------------- */

.head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.93);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.head__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { height: 40px; width: auto; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--display); }
.brand__txt strong { font-weight: 700; font-size: 1.02rem; color: var(--ink); letter-spacing: -.01em; }
.brand__txt small { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.nav { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.nav a { font-family: var(--display); font-weight: 500; font-size: .93rem; color: var(--body);
         text-decoration: none; white-space: nowrap; padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--blue-500); }

@media (max-width: 720px) {
  .head__in { flex-wrap: wrap; padding-block: 14px; gap: 12px; min-height: 0; }
  .nav { width: 100%; gap: 18px; }
  .nav a { font-size: .88rem; }
}

/* ----------------------------- hero ----------------------------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--blue-900);
  background-image:
    radial-gradient(120% 90% at 82% 38%, rgba(45,120,170,.34), transparent 62%),
    radial-gradient(90% 70% at 8% 92%, rgba(12,58,92,.6), transparent 60%);
  color: var(--blue-200);
  padding-block: clamp(72px, 12vw, 140px);
}
.hero__in { position: relative; }
.hero h1 { margin-bottom: .55em; max-width: 15ch; }

/* the one bold move: an oversized version of the logo's rhombus */
.hero__figure {
  position: absolute; pointer-events: none;
  color: #a5cbe6; opacity: .2;
  right: clamp(-150px, -6vw, -40px); top: 50%; transform: translateY(-50%);
  width: clamp(340px, 44vw, 600px); height: auto; aspect-ratio: 1;
}
@media (max-width: 900px) { .hero__figure { right: -36%; opacity: .13; } }

/* ----------------------------- rotating line ----------------------------- */

.spin {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.02rem, 1.8vw, 1.28rem);
  color: var(--blue-200); max-width: none; margin: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .45em;
}
.spin__fixed { flex: none; }

/* every phrase sits in the same grid cell, so the box takes the width of the
   widest one and nothing on the page shifts as they change */
.spin__box { display: inline-grid; }
.spin__item {
  grid-area: 1 / 1;
  color: #fff;
  border-bottom: 1px solid rgba(165,203,230,.45);
  opacity: 0; transform: translateY(.5em);
  transition: opacity .45s ease, transform .45s cubic-bezier(.22,1,.36,1);
}
.spin__item.is-in  { opacity: 1; transform: none; }
.spin__item.is-out { opacity: 0; transform: translateY(-.5em); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spin__item { transition: none; }
  /* no cycling: the script bails out, so pin the first phrase visible */
  .spin__item.is-in { opacity: 1; transform: none; }
}

/* ----------------------------- sections ----------------------------- */

.sec { padding-block: clamp(52px, 7.5vw, 88px); }
.sec--wash { background: var(--blue-100); border-block: 1px solid var(--rule); }
.sec--blue { background: var(--blue-900); color: var(--blue-200); }
.sec--deep { background: var(--blue-800); color: var(--blue-200); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* a label rail on the left, prose on the right */
.spine { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: clamp(18px, 4vw, 56px); align-items: start; }
.spine__rail .label { margin-bottom: 0; padding-top: .45em; }
@media (max-width: 760px) { .spine { grid-template-columns: 1fr; gap: 14px; } }

/* ----------------------------- experience ----------------------------- */

.exp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
       gap: clamp(28px, 6vw, 72px); align-items: center; }
.exp__copy .statement--light { margin-bottom: 1.1em; }
.exp__figure { margin: 0; color: #8fc0e0; }
.net { width: 100%; height: auto; display: block; }
@media (max-width: 860px) {
  .exp { grid-template-columns: 1fr; }
  .exp__figure { order: -1; max-width: 440px; }
}

/* ----------------------------- at a glance ----------------------------- */

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
         gap: 1px; background: var(--rule); border: 1px solid var(--rule);
         margin: 6px 0 0; }
.facts > div { background: var(--paper); padding: 18px 20px; }
.facts dt { font-family: var(--display); font-size: .68rem; font-weight: 600;
            letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; color: var(--ink); font-weight: 600; font-size: .98rem; line-height: 1.35; }

/* ----------------------------- contact ----------------------------- */

/* flex rather than an auto-fit grid: entries size to their content, so the
   block still reads correctly whether there is one of them or several */
.contact { display: flex; flex-wrap: wrap; gap: 26px 48px; margin: 34px 0 0; }
.contact > div { min-width: 0; }
.contact dt { font-family: var(--display); font-size: .68rem; font-weight: 600;
              letter-spacing: .14em; text-transform: uppercase; color: var(--blue-200); margin-bottom: 6px; }
.contact dd { margin: 0; color: #fff; font-size: 1.02rem; overflow-wrap: anywhere; }
.contact a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.contact a:hover { border-bottom-color: #fff; color: #fff; }
.arrow { font-size: .85em; }

/* ----------------------------- footer ----------------------------- */

.foot { background: var(--paper); border-top: 1px solid var(--rule); padding-block: clamp(34px, 5vw, 54px); }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 40px; justify-content: space-between; }
.foot__logo { height: 76px; width: auto; }
.foot__meta { text-align: right; }
.foot__meta p { margin: 0 0 4px; max-width: none; font-size: .95rem; color: var(--ink); }
@media (max-width: 620px) { .foot__meta { text-align: left; } }

/* ----------------------------- placeholder marker ----------------------------- */

.ph {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .82em; background: #FDF3D8; color: #6B5410;
  border-bottom: 1px dashed #C9A227; padding: 1px 5px;
  overflow-wrap: anywhere; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
