/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/dm-sans-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/dm-sans-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/dm-sans-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/dm-sans-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/dm-sans-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/dm-sans-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Shared INTERGROVE design tokens and controls. */
:root {
  color-scheme: light;
  --studio-bg: #f2ede5;
  --studio-surface: #fbf7ef;
  --studio-recessed: #e9dfd1;
  --studio-ink: #211d19;
  --studio-muted: #575044;
  --studio-forest: #244438;
  --studio-forest-deep: #192d25;
  --studio-stone: #b5a48e;
  --studio-walnut: #392b22;
  --studio-brown: #6b4933;
  --studio-dark: #211f1d;
  --studio-dark-surface: #302821;
  --studio-on-dark: #f9f1e5;
  --studio-on-dark-muted: #dfd2c1;
  --studio-accent: #e3bd82;
  --studio-accent-ink: var(--studio-brown);
  --studio-line: #d4c7b5;
  --studio-line-dark: #f9f1e53d;
  --studio-line-control: #786b5c;
  --studio-overlay: #171b15d9;
  --studio-focus-light: #35634f;
  --studio-focus-dark: #f0cb94;
  --studio-nav-light: var(--studio-surface);
  --studio-nav-dark: var(--studio-dark);
  --studio-map-land: #7c8a72;
  --studio-map-outline: #b6bea9;

  --theme-bg: var(--studio-bg);
  --theme-surface: var(--studio-surface);
  --theme-text: var(--studio-ink);
  --theme-text-muted: var(--studio-muted);
  --theme-line: var(--studio-line);
  --theme-accent: var(--studio-accent-ink);
  --theme-focus: var(--studio-focus-light);

  --studio-sans: 'DM Sans', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
  --type-display: clamp(2.35rem, 6.6vw, 7rem);
  --type-section: clamp(2.15rem, 4.7vw, 5.3rem);
  --type-subheading: clamp(1.3rem, 2.25vw, 2.1rem);
  --type-body: clamp(1rem, .945rem + .24vw, 1.1875rem);
  --type-meta: clamp(.6875rem, .65rem + .14vw, .8125rem);
  --type-label: clamp(.75rem, .715rem + .12vw, .875rem);
  --type-button: clamp(.8125rem, .77rem + .15vw, .9375rem);
  --studio-edge: clamp(32px, 4vw, 80px);
  --studio-grid-gap: clamp(12px, 1.65vw, 30px);
  --studio-columns: 12;
  --studio-section-space: clamp(72px, 9vw, 148px);
  --studio-header-height: 76px;

  --duration-fast: 150ms;
  --duration-medium: 290ms;
  --duration-slow: 510ms;
  --ease-standard: cubic-bezier(.25, .1, .25, 1);
  --ease-expressive: cubic-bezier(.22, 1, .36, 1);

  /* Compatibility with the styles shared by the existing pages. */
  --paper: var(--studio-bg);
  --white: var(--studio-surface);
  --ink: var(--studio-ink);
  --muted: var(--studio-muted);
  --forest: var(--studio-forest);
  --line: var(--studio-line);
  --night: var(--studio-dark);
  --surface: var(--studio-surface);
  --accent: var(--studio-accent);
  --lime: var(--studio-accent);
  --gutter: var(--studio-edge);
  --space: var(--studio-section-space);
  --display-font: var(--studio-sans);
  font-family: var(--studio-sans);
  background-color: var(--studio-bg);
}

@media (max-width: 1150px) {
  :root { --studio-columns: 8; }
}

@media (max-width: 760px) {
  :root {
    --studio-columns: 4;
    --studio-edge: clamp(20px, 5.2vw, 24px);
    --studio-header-height: 66px;
    --studio-section-space: clamp(60px, 13vw, 90px);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-medium: 0ms;
    --duration-slow: 0ms;
  }
}

:where(.stage, .approach, .project-explorer, .project-dialog, .site-footer, footer) {
  --theme-bg: var(--studio-dark);
  --theme-surface: var(--studio-dark-surface);
  --theme-text: var(--studio-on-dark);
  --theme-text-muted: var(--studio-on-dark-muted);
  --theme-line: var(--studio-line-dark);
  --theme-accent: var(--studio-accent);
  --theme-focus: var(--studio-focus-dark);
}

:where(.approach, .project-explorer, .site-footer, footer) {
  --theme-bg: var(--studio-forest-deep);
  --theme-surface: var(--studio-forest);
}

body {
  background-color: var(--studio-bg);
  color: var(--studio-ink);
  font-family: var(--studio-sans);
}

::selection { background: var(--studio-accent); color: var(--studio-ink); }

:root :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--theme-focus);
  outline-offset: 4px;
}

.skip:focus { z-index: 60; }

.eyebrow, .kicker, .atlas-label, .atlas-tile-title, .project-tile-tags {
  font-size: var(--type-meta);
  font-weight: 600;
  line-height: 1.4;
}

.eyebrow, .kicker { letter-spacing: .13em; }

:lang(zh-CN) :is(.eyebrow, .kicker, .atlas-label, .project-tile-tags) {
  letter-spacing: .045em;
}

.button, .pill, .project-contact {
  min-height: 46px;
  border-radius: 0;
  font-size: var(--type-button);
  font-weight: 600;
  line-height: 1.4;
  transition: background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard);
}

.button, .pill {
  gap: clamp(16px, 2vw, 30px);
  padding: 10px 17px;
}

.pill:not(.submit), .button--light {
  background: var(--studio-on-dark);
  color: var(--studio-ink);
  border: 1px solid var(--studio-on-dark);
}

.pill:not(.submit):hover, .button--light:hover, .button--light:active {
  background: var(--studio-dark);
  color: var(--studio-on-dark);
  border-color: var(--studio-on-dark);
  transform: none;
}

.button--solid, .pill.submit, .project-case .project-contact {
  background: var(--studio-forest-deep);
  border: 1px solid var(--studio-forest-deep);
  color: var(--studio-on-dark);
}

.button--solid:hover, .pill.submit:not(:disabled):hover, .project-case .project-contact:hover {
  background: var(--studio-forest);
  border-color: var(--studio-forest);
  color: var(--studio-on-dark);
  transform: none;
}

.pill.submit:disabled { opacity: .6; cursor: wait; transform: none; }

.textlink, .line-link, .project-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  font-size: var(--type-button);
  font-weight: 600;
  text-underline-offset: .34em;
  transition: color var(--duration-fast) var(--ease-standard);
}

.textlink:hover, .line-link:hover, .project-back, .project-back:hover {
  color: var(--theme-accent);
}

.line-link:hover, .project-back:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.project-cover, .project-dialog { background: var(--studio-dark); }
.project-gallery-grid img { background: var(--studio-bg); }
.project-dialog::backdrop { background: var(--studio-overlay); }

#enquiry .field label {
  font-size: var(--type-label);
  font-weight: 600;
  line-height: 1.5;
}

#enquiry .field :is(input, select, textarea) {
  min-height: 46px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--studio-line-control);
  border-radius: 0;
  background-color: var(--studio-surface);
  color: var(--studio-ink);
  font-size: 1rem;
  line-height: 1.5;
}

#enquiry .field textarea { min-height: 110px; }
#enquiry .field :is(input, select, textarea)[aria-invalid='true'] {
  border-color: var(--studio-accent-ink);
}
#enquiry :is(.form-note, .form-notice) { color: var(--studio-muted); }

#services, .portfolio { background: var(--studio-surface); }
.contact { background: var(--studio-recessed); }
.project-explorer, .approach, .site-footer, footer { background: var(--theme-bg); color: var(--theme-text); }
main > .section:not(.approach) :is(h1, h2, .concept-info h3),
.project-case :is(h1, h2) { color: var(--studio-forest-deep); }

.approach p, .footer-bottom { color: var(--theme-text-muted); }
.approach .eyebrow, footer .textlink:hover { color: var(--theme-accent); }
.footer-bottom, .approach details { border-color: var(--theme-line); }
.service-view, .service-caption { background: var(--studio-dark-surface); }
#service-tabs .service-button[aria-selected=true] { border-inline-start-color: var(--studio-accent-ink); }
.project-explorer .atlas-label { font-size: var(--type-meta); line-height: 1.4; }
.project-explorer #atlas-world { min-height: 44px; }
.project-explorer #atlas-world:hover { color: var(--theme-accent); border-color: currentColor; }
.project-explorer :is(.map-toolbar, .project-detail, .atlas-project-grid) { border-color: var(--theme-line); }
.project-explorer :is(.project-detail, .project-detail .textlink) { color: var(--theme-text); }
.project-explorer .project-detail .textlink:hover { color: var(--theme-accent); }
.project-explorer .atlas-label { color: var(--theme-accent); }
.project-explorer :is(.atlas-copy, .map-location) { color: var(--theme-text-muted); }
.atlas-image { background: var(--theme-surface); }
.atlas-project-tile {
  background: var(--theme-surface);
  color: var(--theme-text-muted);
  border-color: var(--theme-line);
  transition: color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard);
}
.atlas-tile-progress { background: var(--studio-accent); }
.atlas-project-tile[aria-pressed="true"] { background: var(--studio-walnut); }
.atlas-project-tile:hover, .atlas-project-tile[aria-pressed='true'] {
  border-color: var(--studio-accent);
  color: var(--theme-text);
}

/* Focused controls stay visible beneath persistent navigation. */
body:has(> .site-header) main :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  scroll-margin-block-start: calc(var(--studio-header-height) + 12px);
}

.js .reveal:focus-within {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (forced-colors: active) {
  :root :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid Highlight;
  }

  :is(.outline-pin, .outline-pin span) { border: 2px solid ButtonText; }
  .outline-pin:is([aria-pressed="true"], [data-active]) span { background: Highlight; }
  .outline-canvas path { stroke: CanvasText; }
}
