/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("3f61cb56-9075-49be-b0a8-981f5dcc7a62.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fd0e796a-7616-466a-9dfa-b25edc5db4fe.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("cfeed9bb-9535-46be-a9c5-bf160371a5b6.woff2") format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("06001c05-e9ab-455c-ba4c-c6fc7f9f3fd3.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("82a73ee6-3571-4c10-af7f-b8a4c1625b54.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("1884b0a8-9a74-4898-b91f-33bd505cfdd6.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("698759fa-dce2-474d-8f39-69289fcb68a1.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("3f61cb56-9075-49be-b0a8-981f5dcc7a62.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fd0e796a-7616-466a-9dfa-b25edc5db4fe.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("cfeed9bb-9535-46be-a9c5-bf160371a5b6.woff2") format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("06001c05-e9ab-455c-ba4c-c6fc7f9f3fd3.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("82a73ee6-3571-4c10-af7f-b8a4c1625b54.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("1884b0a8-9a74-4898-b91f-33bd505cfdd6.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("698759fa-dce2-474d-8f39-69289fcb68a1.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("3f61cb56-9075-49be-b0a8-981f5dcc7a62.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fd0e796a-7616-466a-9dfa-b25edc5db4fe.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("cfeed9bb-9535-46be-a9c5-bf160371a5b6.woff2") format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("06001c05-e9ab-455c-ba4c-c6fc7f9f3fd3.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("82a73ee6-3571-4c10-af7f-b8a4c1625b54.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("1884b0a8-9a74-4898-b91f-33bd505cfdd6.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("698759fa-dce2-474d-8f39-69289fcb68a1.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("3f61cb56-9075-49be-b0a8-981f5dcc7a62.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fd0e796a-7616-466a-9dfa-b25edc5db4fe.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("cfeed9bb-9535-46be-a9c5-bf160371a5b6.woff2") format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("06001c05-e9ab-455c-ba4c-c6fc7f9f3fd3.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("82a73ee6-3571-4c10-af7f-b8a4c1625b54.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("1884b0a8-9a74-4898-b91f-33bd505cfdd6.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("698759fa-dce2-474d-8f39-69289fcb68a1.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  size-adjust: 106%;
  font-weight: 400;
  font-display: swap;
  src: url("ibm-plex-mono-400-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  size-adjust: 106%;
  font-weight: 400;
  font-display: swap;
  src: url("ibm-plex-mono-400-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  size-adjust: 106%;
  font-weight: 400;
  font-display: swap;
  src: url("ibm-plex-mono-400-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  size-adjust: 106%;
  font-weight: 400;
  font-display: swap;
  src: url("ibm-plex-mono-400-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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  size-adjust: 106%;
  font-weight: 500;
  font-display: swap;
  src: url("ibm-plex-mono-500-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  size-adjust: 106%;
  font-weight: 500;
  font-display: swap;
  src: url("ibm-plex-mono-500-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  size-adjust: 106%;
  font-weight: 500;
  font-display: swap;
  src: url("ibm-plex-mono-500-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  size-adjust: 106%;
  font-weight: 500;
  font-display: swap;
  src: url("ibm-plex-mono-500-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;
}


  @font-face {
    font-family: 'Uncage Ext';
    src: url("303100e0-9bde-4500-a566-3c43aaf0f0b3.woff2") format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
  }
  @font-face {
    font-family: 'Uncage Ext';
    src: url("4a08633a-ecf8-41b2-b48b-78f050a953b6.woff2") format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
  }
  @font-face {
    font-family: 'Uncage Ext';
    src: url("b1a62b57-914f-46ae-a9a1-145f6575135b.woff2") format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
  }
  @font-face {
    font-family: 'Uncage Ext';
    src: url("80385f15-7c39-420f-bcd4-25a9304596e3.woff2") format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
  }

  /* Same files, metrics normalised: Uncage's 0.25em descent + 0.1em line gap park
     the caps ~0.17em above centre, so flex-centred labels in pills/buttons sit high.
     Display copy keeps the original metrics — overriding them there shifts headings. */
  @font-face {
    font-family: 'Uncage UI';
    src: url("303100e0-9bde-4500-a566-3c43aaf0f0b3.woff2") format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    ascent-override: 90%; descent-override: 10%; line-gap-override: 0%;
  }
  @font-face {
    font-family: 'Uncage UI';
    src: url("4a08633a-ecf8-41b2-b48b-78f050a953b6.woff2") format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
    ascent-override: 90%; descent-override: 10%; line-gap-override: 0%;
  }
  @font-face {
    font-family: 'Uncage UI';
    src: url("b1a62b57-914f-46ae-a9a1-145f6575135b.woff2") format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
    ascent-override: 90%; descent-override: 10%; line-gap-override: 0%;
  }
  @font-face {
    font-family: 'Uncage UI';
    src: url("80385f15-7c39-420f-bcd4-25a9304596e3.woff2") format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    ascent-override: 90%; descent-override: 10%; line-gap-override: 0%;
  }


* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:        #07070a;
  --bg-2:      #0c0c11;
  --bg-3:      #131319;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.16);
  --fg:        #efefe9;
  --fg-2:      #8e8e96;
  --fg-3:      #808089;
  --accent:    oklch(0.78 0.14 70);
  --accent-2:  oklch(0.55 0.18 28);

  --f-display: 'Uncage Ext', sans-serif;
  --f-sans:    'Uncage Ext', 'Inter', -apple-system, sans-serif;
  --f-mono:    'IBM Plex Mono', monospace;
  --f-ui:      'Uncage UI', 'Inter', -apple-system, sans-serif;

  --nav-h: 64px;
  /* F-mark tile from the logo backdrop */
  --fmark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='124' fill='white'%3E%3Cg transform='translate%2820 18%29 scale%28.13%29'%3E%3Cpath d='M141.859 156.779C141.859 148.495 148.575 141.779 156.859 141.779H280.62V198.598C280.62 206.883 273.905 213.598 265.62 213.598H141.859V156.779Z'/%3E%3Crect x='0.618' y='284.182' width='69.38' height='71.82'/%3E%3Cpath d='M70 90.2V212.362H0V55C0 24.624 24.624 0 55 0H350V56.2C350 64.484 343.284 71.2 335 71.2H89C78.507 71.2 70 79.707 70 90.2Z'/%3E%3C/g%3E%3Cg transform='translate%28140 80%29 scale%28.13%29'%3E%3Cpath d='M141.859 156.779C141.859 148.495 148.575 141.779 156.859 141.779H280.62V198.598C280.62 206.883 273.905 213.598 265.62 213.598H141.859V156.779Z'/%3E%3Crect x='0.618' y='284.182' width='69.38' height='71.82'/%3E%3Cpath d='M70 90.2V212.362H0V55C0 24.624 24.624 0 55 0H350V56.2C350 64.484 343.284 71.2 335 71.2H89C78.507 71.2 70 79.707 70 90.2Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* Italic display copy: Uncage Ext has no true italic, browser synthesizes the slant */
.hero-title em,
.services-head h2 em,
.process-head h2 em,
.projects h2 em,
.about h2 em,
.svc-title em,
.footer-cta em,
.strip-item em,
.modal h3 em,
.contact .phone em {
  font-family: var(--f-display);
  font-weight: 400;
  font-style: italic;
}

/* Buttons, nav and other flex-centred labels: metric-normalised Uncage */
.nav-menu a,
.nav-cta,
.nav-drawer-cta,
.btn,
.tg-btn,
.contact-btn { font-family: var(--f-ui); }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

body {
  overflow-x: hidden;
}

body.loading { overflow: hidden; }

::selection { background: var(--accent); color: #07070a; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video, svg { display: block; max-width: 100%; }

/* ───── Grain overlay ───── */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 9000;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Perf — touch devices repaint the whole grain overlay on every scroll frame
   with mix-blend-mode. Drop it on mobile. Same for cursor (touch never sees it
   anyway, but mix-blend-mode keeps a compositor layer alive). */
@media (hover: none), (max-width: 720px) {
  .grain { display: none; }
  .cursor { display: none !important; }
  /* backdrop-filter is the single most expensive thing per scroll frame on
     mobile Safari/Chrome. Swap for an opaque background of similar tone. */
  .modal::backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(7,7,10,0.9);
  }
  .nav {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(12, 12, 17, 0.92) !important;
  }
}

/* ───── Loading (wordmark) ───── */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.loader-wordmark {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(56px, 11vw, 140px);
  letter-spacing: -0.025em;
  line-height: 1;
  text-transform: uppercase;
  display: flex; gap: 0.01em;
  color: var(--fg);
}
.loader-wordmark span {
  display: inline-block;
  opacity: 0;
  transform: translateY(40%);
}
/* Lockup mirrors the logo: heavy FUTURMI over a regular-weight STUDIO */
.loader-lockup {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
}
.loader-sub {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(34px, 6.6vw, 84px);
  line-height: 1;
  margin-top: 0.12em;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--fg);
  opacity: 0;
}
/* Tiled F-mark field from the logo backdrop, drifting diagonally */
.loader-pattern {
  position: absolute; inset: -50%; /* oversized so the tilt never exposes corners */
  transform: rotate(-12deg);
  background: var(--fmark) 0 0 / 240px 124px;
  opacity: 0;
  animation: loaderDrift 24s linear infinite;
}
@keyframes loaderDrift { to { transform: rotate(-12deg) translate(240px, 124px); } }
.loader-line {
  position: relative;
  margin-top: clamp(32px, 4vw, 48px);
  width: min(240px, 60vw);
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader-line-fill {
  position: absolute; inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--fg));
}
.loader-counter {
  position: absolute; bottom: 32px; left: 32px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-2); letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-flex; gap: 12px; align-items: center;
}
.loader-counter .dot {
  width: 6px; height: 6px;
  background: oklch(0.72 0.16 145);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
.loader-meta {
  position: absolute; bottom: 32px; right: 32px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.18em;
}

/* ───── Pill Navbar ───── */
.nav {
  position: fixed;
  top: 20px;
  left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex; align-items: center;
  height: var(--nav-h);
  padding: 6px 6px 6px 24px;
  background: rgba(12, 12, 17, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  gap: 4px;
  opacity: 0;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 20px 60px -20px rgba(0,0,0,0.8);
}
.nav-logo {
  display: flex; align-items: center;
  padding-right: 16px;
  margin-right: 8px;
  height: 36px;
  border-right: 1px solid var(--line);
  flex-shrink: 0;
}
.nav-logo img {
  height: 24px;
  width: 24px;
  display: block;
  flex-shrink: 0;
}
.nav-menu {
  display: flex; gap: 2px;
}
.nav-menu a {
  position: relative;
  padding: 0 16px;
  height: 36px;
  display: inline-flex; align-items: center;
  font-size: 12.5px;
  color: var(--fg-2);
  border-radius: 999px;
  transition: color .25s ease, background .25s ease;
  letter-spacing: 0.01em;
}
.nav-menu a:hover { color: var(--fg); }
.nav-menu a.active {
  color: var(--fg);
  background: rgba(255,255,255,0.07);
}
.nav-cta {
  margin-left: 8px;
  height: 52px;
  padding: 0 22px 0 24px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform .3s cubic-bezier(.65,0,.35,1), opacity .25s ease;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-cta-arrow {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg); color: var(--fg);
  display: grid; place-items: center;
  font-size: 11px;
}

@media (max-width: 720px) {
  .nav { padding-left: 14px; }
  .nav-menu { display: none; }
  .nav-logo { border-right: 0; margin-right: 0; padding-right: 0; }
}

/* ───── Mobile Burger + Drawer ─────
   The pill nav stays on top; the sheet unrolls beneath it, matching its
   width and radius, so the menu reads as the nav growing rather than a new page. */
.nav-burger {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  margin-left: 8px;
  border-radius: 999px;
  flex-shrink: 0;
  transition: background .25s ease;
}
.nav-burger span {
  position: absolute; left: 50%; top: 50%;
  width: 20px; height: 1.5px; margin: -0.75px 0 0 -10px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .45s cubic-bezier(.16,1,.3,1), opacity .2s ease;
}
.nav-burger span:nth-child(1) { transform: translateY(-6px); }
.nav-burger span:nth-child(3) { transform: translateY(6px); }
.nav-burger.open { background: rgba(255,255,255,0.07); }
.nav-burger.open span:nth-child(1) { transform: rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg); }

.nav-drawer {
  display: none;
  position: fixed;
  top: 20px; left: 50%;
  width: calc(100vw - 24px); max-width: 480px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto; overscroll-behavior: contain;
  z-index: 99; /* under .nav (100) so the burger doubles as the close button */
  flex-direction: column;
  padding: calc(56px + 20px) 20px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 28px;
  translate: -50% -12px;
  scale: .97;
  transform-origin: 50% 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity .25s ease,
    translate .45s cubic-bezier(.16,1,.3,1),
    scale .45s cubic-bezier(.16,1,.3,1),
    visibility 0s linear .45s;
}
.nav-drawer.open {
  translate: -50% 0;
  scale: 1;
  opacity: 1;
  visibility: visible;
  transition: opacity .3s ease, translate .5s cubic-bezier(.16,1,.3,1), scale .5s cubic-bezier(.16,1,.3,1);
}
/* page dim  */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 98;
  background: rgba(4,4,7,.72);
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
}
.menu-open body::after { opacity: 1; pointer-events: auto; }
.menu-open, .menu-open body { overflow: hidden; }
.menu-open .nav { background: var(--bg-2) !important; border-color: transparent; box-shadow: none; }

.nav-drawer-inner {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.nav-drawer-link,
.nav-drawer-foot {
  opacity: 0;
  translate: 0 14px;
  transition: opacity .2s ease, translate .2s ease;
}
.nav-drawer.open .nav-drawer-link,
.nav-drawer.open .nav-drawer-foot {
  opacity: 1;
  translate: 0 0;
  transition: opacity .5s ease, translate .6s cubic-bezier(.16,1,.3,1);
  transition-delay: calc(.08s + var(--i) * .04s);
}
.nav-drawer-link {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px;
  font-family: var(--f-display);
  font-size: clamp(28px, 8.2vw, 38px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--fg-2);
  border-bottom: 1px solid var(--line);
}
.nav-drawer-link::after {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  scale: 0;
  transition: scale .35s cubic-bezier(.16,1,.3,1);
}
.nav-drawer-link.active { color: var(--fg); }
.nav-drawer-link.active::after { scale: 1; }
.nav-drawer-link:active { color: var(--fg); }

.nav-drawer-foot {
  display: flex; flex-direction: column; gap: 4px;
  padding-top: 24px;
}
.nav-drawer-tg {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 22px 0 24px;
  background: var(--fg); color: var(--bg);
  border-radius: 999px;
  font-family: var(--f-ui);
  font-size: 14px; font-weight: 500;
}
.nav-drawer-tg:active { transform: scale(.98); }
.nav-drawer-mail {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--fg-2);
}
.nav-drawer-link:focus-visible, .nav-drawer-mail:focus-visible { outline-offset: -2px; border-radius: 8px; }
.nav-drawer-tg:focus-visible { border-radius: 999px; }

@media (max-width: 720px) {
  .nav-burger { display: block; }
  .nav-drawer { display: flex; }
  .nav-cta {
    height: 40px;
    padding: 0 16px 0 18px;
    font-size: 11.5px;
    margin-left: auto;
  }
  .nav-cta-arrow { width: 18px; height: 18px; font-size: 10px; }
}
/* 641–720px: nav keeps its natural pill width, match the sheet to the viewport */
@media (min-width: 641px) and (max-width: 720px) {
  .nav-drawer { padding-top: calc(var(--nav-h) + 20px); }
}

/* ───── Layout helpers ───── */
.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-2); text-transform: uppercase;
  letter-spacing: 0.18em;
}
.kicker::before {
  content: ''; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
}

/* ───── Hero ───── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding: 140px 32px 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
  filter: contrast(1.05) saturate(1.05);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 110% 80% at 50% 40%, transparent 0%, rgba(7,7,10,0.55) 70%, var(--bg) 100%),
    linear-gradient(180deg, rgba(7,7,10,0.2) 0%, transparent 30%, transparent 60%, var(--bg) 100%);
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background-image:
    repeating-linear-gradient(90deg,
      rgba(255,255,255,0.02) 0,
      rgba(255,255,255,0.02) 1px,
      transparent 1px,
      transparent 80px);
  pointer-events: none;
}

.hero-top {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: auto;
  padding-top: 20px;
}
.hero-top-left {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-2); text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1.8;
}
.hero-top-left strong { color: var(--fg); font-weight: 400; }
.hero-top-right {
  display: flex; gap: 32px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase;
  letter-spacing: 0.18em;
}
.hero-top-right span { display: block; color: var(--fg-2); }

.hero-mid {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  margin: 80px 0;
}
.hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(48px, 9.5vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.hero-title .l1 { display: block; }
.hero-title .l2 { display: block; padding-left: 0; }
.hero-title em {
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
}
.hero-title .word, .hero-title .char {
  display: inline-block;
  overflow: visible;
}
/* SplitType wraps lines with overflow:hidden — that clips Cyrillic diacritics like й's breve.
   Force visible so accents above the cap-height aren't cropped. */
.hero-title .line {
  overflow: visible !important;
}

.hero-bot {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  align-items: end;
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.hero-blurb {
  font-size: 15px;
  color: var(--fg-2);
  max-width: 380px;
  line-height: 1.55;
}
.hero-blurb strong { color: var(--fg); font-weight: 500; }
.hero-cta-row {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 0 26px;
  height: 56px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform .3s cubic-bezier(.65,0,.35,1), background .25s ease, color .25s ease;
}
.btn-fill {
  background: var(--fg); color: var(--bg);
}
.btn-fill:hover { transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--line-2); color: var(--fg);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); transform: translateY(-2px); }
.btn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}
.hero-counters {
  justify-self: end;
  display: flex; gap: 40px;
  text-align: right;
}
.hero-counters .v {
  font-family: var(--f-display); font-weight: 500;
  font-size: 36px; letter-spacing: -0.02em; line-height: 1;
  color: var(--fg);
}
.hero-counters .l {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 10px;
}

@media (max-width: 880px) {
  .hero-bot { grid-template-columns: 1fr; }
  .hero-counters { justify-self: start; }
  .hero-top-right { display: none; }
}

/* ───── Cross marquee strip ───── */
.strip {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  padding: 24px 0;
  overflow: hidden;
}
.strip-track {
  display: flex; gap: 56px;
  white-space: nowrap;
  animation: scrollX 50s linear infinite;
  will-change: transform;
}
.strip-item {
  display: inline-flex; align-items: center; gap: 56px;
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-transform: uppercase;
}
.strip-item em {
  font-style: italic; font-weight: 400;
  color: var(--accent);
}
.strip-cross {
  width: 18px; height: 18px;
  position: relative;
  color: var(--fg-3);
}
.strip-cross::before, .strip-cross::after {
  content: ''; position: absolute;
  background: currentColor;
}
.strip-cross::before { inset: 8px 0; }
.strip-cross::after { inset: 0 8px; }

@keyframes scrollX {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ───── Services / tilted scroll rail ───── */
.services {
  position: relative;
  padding: 80px 0 80px;
  overflow-x: clip;
  overflow-y: visible;
}
.services-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 32px;
  margin-bottom: 32px;
  max-width: 1440px;
  margin-left: auto; margin-right: auto;
  padding: 0 32px;
}
.services-head h2 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.services-head h2 em {
  font-style: italic; font-weight: 400;
  display: block;
}
.services-head p {
  color: var(--fg-2);
  font-size: 16px;
  max-width: 380px;
  margin-left: auto;
  line-height: 1.55;
}

.services-rail-wrap {
  position: relative;
  min-height: min(100vh, 720px);
  display: flex; align-items: center;
  overflow-x: clip;
  overflow-y: visible;
  padding: 60px 0;
}
.services-rail {
  display: flex; gap: 28px;
  padding: 0 32px 0 32px;
  will-change: transform;
}

.svc {
  position: relative;
  flex: 0 0 clamp(320px, 26vw, 520px);
  height: clamp(420px, 64vh, 580px);
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 28px;
  display: flex; flex-direction: column;
  transition: border-color .3s ease, box-shadow .4s ease;
}
.svc:hover { border-color: var(--line-2); box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6); }

.svc {
  --r: 0deg; --ty: 0px; --lift: 0px; --mx: 50%; --my: 50%;
  transform: rotate(var(--r)) translateY(calc(var(--ty) + var(--lift)));
  transition: border-color .3s ease, box-shadow .4s ease, transform .6s cubic-bezier(.16,1,.3,1);
}
.svc-tilt-1 { --r: -1.8deg; --ty: 4px; }
.svc-tilt-2 { --r: 1deg; --ty: -4px; }
.svc-tilt-3 { --r: -1deg; --ty: 8px; }
.svc-tilt-4 { --r: 1.5deg; --ty: -6px; }
.svc-tilt-5 { --r: -2deg; --ty: 2px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .svc:hover { --lift: -8px; }
  /* Cursor spotlight */
  .svc::after {
    content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255,255,255,0.09), transparent 45%);
    opacity: 0; transition: opacity .4s ease;
  }
  .svc:hover::after { opacity: 1; }
}

.svc-bg { position: absolute; inset: 0; z-index: 0; }
.svc-bg::before, .svc-bg::after {
  content: ''; position: absolute; inset: 0;
}
.svc-bg::before {
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 18px);
  opacity: 0.7;
}
.svc-1 .svc-bg::after { background: radial-gradient(ellipse at 30% 100%, oklch(0.45 0.16 260 / 0.55), transparent 60%); }
.svc-2 .svc-bg::after { background: radial-gradient(ellipse at 80% 20%, oklch(0.55 0.18 28 / 0.45), transparent 60%); }
.svc-3 .svc-bg::after { background: radial-gradient(ellipse at 20% 60%, oklch(0.6 0.14 140 / 0.4), transparent 60%); }
.svc-4 .svc-bg::after { background: radial-gradient(ellipse at 100% 80%, oklch(0.5 0.15 300 / 0.45), transparent 60%); }
.svc-5 .svc-bg::after { background: radial-gradient(ellipse at 50% 0%, oklch(0.65 0.14 70 / 0.45), transparent 60%); }

.svc-inner {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column;
}
.svc-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase;
  letter-spacing: 0.15em;
}
.svc-glyph {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  color: var(--fg);
  transition: background .3s, color .3s;
}
.svc:hover .svc-glyph { background: var(--fg); color: var(--bg); }
.svc-title {
  margin-top: auto;
  font-family: var(--f-display); font-weight: 700;
  font-size: 30px;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.svc-title em {
  font-style: italic; font-weight: 400;
  display: block;
  color: var(--fg-2);
}
.svc-desc {
  margin-top: 22px;
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.55;
}
.svc-meta {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase;
  letter-spacing: 0.15em;
}

.services-hint {
  position: absolute;
  bottom: 16px;
  left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase;
  letter-spacing: 0.18em;
  z-index: 2;
}
.services-hint .arrow {
  display: inline-block; width: 14px;
  border-top: 1px solid currentColor;
  position: relative;
}
.services-hint .arrow::after {
  content: ''; position: absolute;
  right: 0; top: -3px;
  width: 6px; height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

@media (max-width: 720px) {
  .services-head { grid-template-columns: 1fr; }
  .services-head p { margin-left: 0; }
  .svc { flex: 0 0 280px; height: 460px; padding: 24px; }
  .svc-title { font-size: 24px; }
}

/* ───── Process band ───── */
.process {
  padding: 140px 0;
  border-top: 1px solid var(--line);
}
.process-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 80px; gap: 32px;
}
.process-head h2 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.95; letter-spacing: -0.025em;
  text-transform: uppercase;
}
.process-head h2 em { font-style: italic; font-weight: 400; }
.process-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  gap: 0;
}
.process-step {
  padding: 40px 32px 48px 32px;
  border-right: 1px solid var(--line);
  position: relative;
}
.process-step:first-child {
  padding-left: 0;
}
.process-step:not(:last-child) {
  padding-right: 32px;
}
.process-step:last-child { border-right: 0; padding-right: 0; }
.process-step .num {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.15em;
  margin-bottom: 40px;
}
.process-step .t {
  font-family: var(--f-display); font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  text-transform: uppercase;
  line-height: 1.2;
}
.process-step .d {
  color: var(--fg-2); font-size: 14px;
  line-height: 1.55;
  max-width: 260px;
}
@media (max-width: 880px) {
  .process-grid { grid-template-columns: 1fr 1fr; }
  .process-step { padding: 32px 24px 32px 0; }
  .process-step:nth-child(2) { border-right: 0; padding-right: 0; }
  .process-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .process-step:nth-child(3) { padding-left: 0; }
}

/* ───── Projects ───── */
.projects {
  position: relative;
  padding: 200px 32px;
  text-align: center;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.projects-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, oklch(0.4 0.12 70 / 0.18), transparent 60%);
  pointer-events: none;
}
.projects h2 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(40px, 7vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 28px 0;
}
.projects h2 em { font-style: italic; font-weight: 400; color: var(--accent); }
.projects p {
  color: var(--fg-2);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.projects-slots {
  display: flex; gap: 16px;
  justify-content: center;
  margin-top: 64px;
  flex-wrap: wrap;
}
.proj-slot {
  width: 200px; height: 260px;
  border-radius: 14px;
  border: 1px dashed var(--line-2);
  background: var(--bg-2);
  text-align: left;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase;
  letter-spacing: 0.15em;
}
.proj-slot.first {
  border: 1px solid var(--accent);
  background: linear-gradient(oklch(0.4 0.12 70 / 0.12), oklch(0.4 0.12 70 / 0.12)), var(--bg-2);
  color: var(--accent);
}
.proj-slot .num {
  font-family: var(--f-display); font-weight: 500;
  font-size: 32px; letter-spacing: -0.02em;
  color: inherit;
}
.proj-slot .label {
  text-align: right;
}

/* ───── About ───── */
.about {
  padding: 160px 0;
  border-top: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  margin-top: 60px;
}
.about h2 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.about h2 em { font-style: italic; font-weight: 400; }
.about-body {
  color: var(--fg-2);
  font-size: 16px;
  line-height: 1.65;
  max-width: 560px;
}
.about-body p + p { margin-top: 16px; }
.about-body strong { color: var(--fg); font-weight: 500; }

.contact {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  background: var(--bg-2);
}
.contact .label {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 24px;
}
.contact .phone {
  display: block;
  font-family: var(--f-display); font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  transition: color .25s ease;
}
.contact .phone:hover { color: var(--accent); }
.contact-row {
  display: flex; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.contact-row:last-child { border-bottom: 0; }
.contact-row .k {
  color: var(--fg-3);
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
}
.contact-row .v { color: var(--fg); transition: color .25s ease; }
.contact-row a.v:hover { color: var(--accent); }

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ───── Footer ───── */
.footer {
  padding: 80px 32px 32px;
  position: relative;
  border-top: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
}
.footer-col h4 {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase;
  letter-spacing: 0.18em; margin-bottom: 20px;
  font-weight: 400;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--fg); font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-col .lead {
  font-family: var(--f-display); font-weight: 500;
  font-size: 22px; letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.footer-col p { color: var(--fg-2); font-size: 13px; line-height: 1.55; }
.footer-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-2); letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 8px;
}
.footer-status .dot {
  width: 6px; height: 6px;
  background: oklch(0.72 0.16 145);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.footer-wordmark-wrap {
  margin: 60px 0 24px;
  display: flex; justify-content: center;
  user-select: none;
  border-top: 1px solid var(--line);
  padding-top: 60px;
}
.footer-wordmark-wrap img {
  width: 100%;
  max-width: 1180px;
  height: auto;
  opacity: 0.95;
}

.footer-bottom {
  position: relative;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-wrap: wrap; gap: 16px;
}
.footer-bottom a:hover { color: var(--fg); }
.back-to-top {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--fg-2);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .25s, border-color .25s, transform .25s;
}
.back-to-top:hover { color: var(--fg); border-color: var(--line-2); transform: translateY(-2px); }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ───── Modal (native <dialog>: focus trap, Esc and inert background for free) ───── */
.modal {
  width: calc(100% - 48px); max-width: 520px;
  margin: auto;
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px;
  opacity: 0;
  transform: translateY(20px) scale(.98);
  transition: opacity .3s ease, transform .4s cubic-bezier(.16,1,.3,1), overlay .4s allow-discrete, display .4s allow-discrete;
}
.modal[open] { opacity: 1; transform: none; }
@starting-style { .modal[open] { opacity: 0; transform: translateY(20px) scale(.98); } }
.modal::backdrop {
  background: rgba(7,7,10,0.85);
  backdrop-filter: blur(12px);
}
.modal-kicker { margin-bottom: 20px; }
.modal-tg .modal-sub { margin-bottom: 36px; }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--fg-2);
  transition: color .25s, border-color .25s;
}
.modal-close:hover { color: var(--fg); border-color: var(--line-2); }
.modal h3 {
  font-family: var(--f-display); font-weight: 700;
  font-size: 28px; letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.modal-sub {
  color: var(--fg-2); font-size: 14px; margin-bottom: 28px;
}
.field { margin-bottom: 16px; }
.field-label {
  display: block;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase;
  letter-spacing: 0.15em; margin-bottom: 8px;
}
.field-input, .field-textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--f-sans);
  font-size: 14px;
  color: var(--fg);
  transition: border-color .2s, background .2s;
}
.field-input:focus, .field-textarea:focus {
  outline: 0;
  border-color: var(--fg-2);
  background: rgba(255,255,255,0.06);
}
.field-textarea { resize: vertical; min-height: 88px; font-family: var(--f-sans); }
.modal-submit {
  width: 100%; height: 52px;
  background: var(--fg); color: var(--bg);
  border-radius: 999px;
  font-weight: 500; font-size: 13.5px;
  margin-top: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}


.success {
  text-align: center; padding: 24px 0;
}
.success-mark {
  width: 64px; height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%; border: 1px solid var(--accent);
  display: grid; place-items: center;
  color: var(--accent);
  font-size: 22px;
}

/* ───── Custom cursor (tiny) ───── */
.cursor {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9500;
  transform: translate(-50%,-50%);
  transition: width .25s, height .25s, background .25s, opacity .25s;
  mix-blend-mode: difference;
  opacity: 0;
}
.cursor.hov { width: 36px; height: 36px; background: var(--fg); opacity: 0.4; }
@media (pointer: coarse) { .cursor { display: none; } }

/* ═══════════════════════════════
   MOBILE OPTIMIZATIONS (≤ 640px)
   ═══════════════════════════════ */
@media (max-width: 640px) {
  /* Layout */
  .wrap { padding: 0 20px; }
  
  /* Nav */
  .nav {
    height: 56px;
    width: calc(100vw - 24px);
    max-width: 480px;
    padding: 6px 8px 6px 16px;
    justify-content: space-between;
  }
  .nav-logo {
    padding: 0 14px 0 0;
    font-size: 16px;
    height: 40px;
  }
  .nav-logo svg, .nav-logo img { width: 22px; height: 22px; }
  .nav-cta {
    padding: 0 18px;
    height: 40px;
    font-size: 12px;
    margin-left: auto;
    margin-right: 6px;
  }
  .nav-burger {
    width: 44px;
    height: 44px;
  }
  .nav-burger span {
    width: 22px;
    margin-left: -11px;
  }
  
  /* Hero */
  .hero {
    padding: 100px 20px 40px;
    min-height: 100svh;
  }
  .hero-top {
    grid-template-columns: 1fr;
    gap: 16px;
    font-size: 11px;
  }
  .hero-top-right { display: none; }
  .hero-mid { margin: 40px 0; }
  .hero-title {
    font-size: clamp(34px, 9.5vw, 52px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    word-break: keep-all;
  }
  .hero-bot {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-counters {
    justify-self: start;
    gap: 32px;
  }
  .hero-counters .v { font-size: 40px; }
  
  /* Strip marquee */
  .strip { padding: 32px 0; }
  .strip-track { animation-duration: 12s !important; }
  
  /* Services */
  .services { padding: 80px 20px; }
  .services-head {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 40px;
    padding: 0;
  }
  .services-head h2 {
    font-size: clamp(36px, 11vw, 56px);
    line-height: 0.95;
  }
  .services-head p {
    max-width: 100%;
    margin-left: 0;
    font-size: 14px;
  }

  /* Projects → 2x2 grid on mobile */
  .projects-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 72px;
    padding: 0 4px;
  }
  .proj-slot {
    width: auto;
    height: 180px;
    padding: 14px;
    border-radius: 12px;
  }
  .proj-slot .num { font-size: 26px; }

  /* Process */
  .process { padding: 80px 0; }
  .process-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 48px;
  }
  .process-head h2 {
    font-size: clamp(36px, 11vw, 56px);
    line-height: 0.95;
  }
  .process-head p {
    max-width: 100% !important;
    font-size: 14px !important;
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .process-step {
    padding: 28px 0 28px 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line);
  }
  .process-step:last-child { border-bottom: 0; }
  .process-step .num { margin-bottom: 24px; }
  .process-step .t { font-size: 18px; }
  .process-step .d { max-width: 100%; }
  
  /* Projects */
  .projects { padding: 100px 20px; }
  .projects h2 {
    font-size: clamp(36px, 11vw, 56px);
    line-height: 0.95;
  }
  .projects p {
    font-size: 14px;
    max-width: 100%;
  }
  
  /* About */
  .about { padding: 80px 0; }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about h2 {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.1;
  }
  .about-body p { font-size: 15px; }
  .contact-row {
    grid-template-columns: 80px 1fr;
    padding: 14px 0;
    font-size: 13px;
  }
  .contact-row .v { font-size: 14px; }
  
  /* Footer */
  .footer { padding: 60px 20px 32px; }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  .footer-col { font-size: 13px; }
  .footer-col h4 { font-size: 11px; margin-bottom: 12px; }
  .footer-wordmark-wrap { padding: 40px 0 24px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    font-size: 11px;
    padding-top: 24px;
  }
  .back-to-top { font-size: 11px; padding: 8px 14px; }
  
  /* Modal */
  .modal {
    width: calc(100% - 24px);
    padding: 32px 24px !important;
  }
  .modal h3 {
    font-size: clamp(26px, 8vw, 36px) !important;
    line-height: 1.05;
  }
  
  /* Loading */
}

/* Smaller phones */
@media (max-width: 380px) {
  .hero-title { font-size: 32px; }
  .services-head h2,
  .process-head h2,
  .projects h2 { font-size: 34px; }
  .nav-cta { padding: 0 12px; font-size: 11px; }
  .nav-logo span { display: none; }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .wrap { padding: 0 24px; }
  .hero { padding: 120px 24px 50px; }
  .hero-title { font-size: clamp(64px, 10vw, 96px); }
}

.sec-title { margin-top: 16px; }
.process-lead { color: var(--fg-2); font-size: 15px; max-width: 320px; }
.hero-counters .unit { color: var(--fg-3); font-weight: 400; }

/* ───── FTRMST upgrades ───── */
.nav { transition: translate .45s cubic-bezier(.16,1,.3,1); }
.nav.nav-hidden { translate: 0 calc(-100% - 32px); }

.svc { cursor: pointer; }
.svc:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 22px; }

.projects-bg {
  overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 65% 75% at 50% 50%, #000 25%, transparent 80%);
          mask-image: radial-gradient(ellipse 65% 75% at 50% 50%, #000 25%, transparent 80%);
}
.projects-bg::before {
  content: ''; position: absolute; inset: -50%;
  background: var(--fmark) 0 0 / 240px 124px;
  transform: rotate(-12deg);
  opacity: 0.06;
}
/* hover lift on `translate` so it never fights GSAP's transform during the flip-in */
a.proj-slot.first { transition: background .3s ease, translate .3s cubic-bezier(.16,1,.3,1); }
a.proj-slot.first:hover { background: linear-gradient(oklch(0.4 0.12 70 / 0.22), oklch(0.4 0.12 70 / 0.22)), var(--bg-2); translate: 0 -4px; }


.mail-row { position: relative; }
.copy-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 999px;
  color: var(--fg-2);
  transition: color .2s, background .2s;
}
.copy-btn:hover { color: var(--fg); background: rgba(255,255,255,0.06); }
.copy-btn.copied { color: oklch(0.72 0.16 145); }
.copy-btn.copied::after {
  content: 'Скопировано';
  position: absolute; bottom: calc(100% + 6px); right: 0;
  padding: 4px 10px; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; white-space: nowrap;
  pointer-events: none;
}
.mail-row .copy-btn { position: absolute; right: 10px; top: 50%; translate: 0 -50%; }
.contact-row .v-wrap { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.contact-row .copy-btn { width: 28px; height: 28px; margin: -6px -6px -6px 0; }


/* ───── FAQ ───── */
.faq { padding: 160px 0; border-top: 1px solid var(--line); }
.faq-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }
.faq h2 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(40px, 6vw, 88px); line-height: .95; letter-spacing: -0.025em;
  text-transform: uppercase;
}
.faq h2 em { font-style: italic; font-weight: 400; display: block; }
.faq-aside { position: sticky; top: 120px; }
.faq-aside p { color: var(--fg-2); font-size: 15px; line-height: 1.6; max-width: 340px; margin-top: 24px; }
.faq-aside .btn { margin-top: 32px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0;
  font-family: var(--f-display); font-weight: 500; font-size: clamp(17px, 1.6vw, 22px);
  letter-spacing: -0.01em; line-height: 1.25;
  transition: color .2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary:focus-visible { outline-offset: 6px; }
.faq-ico {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line-2); position: relative;
  transition: transform .35s cubic-bezier(.16,1,.3,1), background .2s;
}
.faq-ico::before, .faq-ico::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 11px; height: 1.5px; background: currentColor; translate: -50% -50%;
}
.faq-ico::after { rotate: 90deg; }
.faq-item[open] .faq-ico { transform: rotate(45deg); background: rgba(255,255,255,0.06); }
.faq-item p { color: var(--fg-2); font-size: 15px; line-height: 1.65; max-width: 60ch; padding: 0 56px 28px 0; }
/* Smooth open where supported (Chrome 131+, Safari 18.4+) */
@supports (interpolate-size: allow-keywords) {
  .faq-list { interpolate-size: allow-keywords; }
  .faq-item::details-content { height: 0; overflow: clip; transition: height .4s cubic-bezier(.16,1,.3,1), content-visibility .4s allow-discrete; }
  .faq-item[open]::details-content { height: auto; }
}
@media (max-width: 880px) {
  .faq { padding: 80px 0; }
  .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .faq-aside { position: static; }
  .faq-item p { padding-right: 0; }
}

.process-line {
  position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: var(--accent);
  transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}
.process-step .num { transition: color .5s ease; }
.process-step.lit .num { color: var(--accent); }
.projects-bg::before { translate: 0 var(--py, 0px); }
.split-word { display: inline-block; }

.proj-secret { cursor: default; }

/* ───── Mobile ───── */
@media (max-width: 720px) {
  /* Services: swipe the cards instead of a pinned scroll */
  .services-rail-wrap {
    min-height: 0; padding: 0 0 40px; margin: 0 -20px; /* bleed past the section padding to the screen edge */
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .services-rail-wrap::-webkit-scrollbar { display: none; }
  .services-rail { padding: 12px 20px; gap: 14px; }
  .svc { scroll-snap-align: center; flex-basis: min(80vw, 320px); }

  /* 44px tap targets */
  .nav-cta { height: 44px; }
  .nav-logo { height: 44px; min-width: 44px; }
  .footer-col li { margin-bottom: 0; }
  .footer-col a { display: inline-flex; align-items: center; min-height: 44px; }
  .contact-row { align-items: center; padding: 4px 0; }
  .contact-row .v { display: inline-flex; align-items: center; min-height: 44px; }
  .contact-row .copy-btn { width: 44px; height: 44px; margin: 0 -10px 0 0; }
  .back-to-top { min-height: 44px; }
  /* grid items may shrink below their content, so the email + copy button can't push the page wider */
  .about-grid > * { min-width: 0; }
  .contact-row { gap: 12px; }
  .contact-row .v { overflow-wrap: anywhere; }

  .faq-aside .btn { margin-top: 20px; }
}
a, button, summary, [role=button] { -webkit-tap-highlight-color: transparent; }

/* ───── Polish: focus, press, browser surfaces, wrapping ───── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.btn:focus-visible, .nav-cta:focus-visible, .nav-menu a:focus-visible, .tg-btn:focus-visible,
.contact-btn:focus-visible, .modal-close:focus-visible, .back-to-top:focus-visible, .nav-burger:focus-visible { border-radius: 999px; }
.btn:active, .nav-cta:active, .tg-btn:active, .modal-close:active { transform: scale(.98); }
html { scrollbar-color: var(--fg-3) var(--bg); caret-color: var(--accent); }
.hero { min-height: 100svh; }
h1, h2, h3, .svc-title { text-wrap: balance; }
p, .svc-desc, .process-step .d, .hero-blurb { text-wrap: pretty; }
.hero-counters .v { font-variant-numeric: tabular-nums; }
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 9600;
  padding: 10px 16px; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-size: 13px;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .strip-track { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ───── Contact modal ───── */
.modal-tg { max-width: 440px; padding: 44px 36px 36px; overflow: hidden; }
/* warm accent glow in the corner, echoes the orange dot used across the site */
.modal-tg::before {
  content: '';
  position: absolute; top: -140px; right: -120px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(closest-side, oklch(0.78 0.14 70 / .16), transparent);
  pointer-events: none;
}
.modal-tg h3 { font-size: clamp(34px, 4vw, 44px); line-height: 1; margin-bottom: 14px; }
.modal-tg .modal-sub { font-size: 15px; line-height: 1.5; max-width: 32ch; margin-bottom: 32px; }
.modal-close { width: 40px; height: 40px; top: 16px; right: 16px; }

.contact-actions { display: grid; gap: 10px; }
.tg-btn, .contact-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; height: 60px; padding: 0 22px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  transition: background .25s, border-color .25s, translate .25s cubic-bezier(.16,1,.3,1);
}
.tg-btn { background: #229ED9; color: #fff; }
.tg-btn:hover { background: #1c89bd; translate: 0 -1px; }
.tg-btn span:first-of-type, .contact-btn span { flex: 1; }
.tg-arrow { opacity: .75; font-size: 16px; }
.contact-btn {
  color: var(--fg);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.contact-btn svg { color: var(--fg-2); flex-shrink: 0; transition: color .25s; }
.contact-btn:hover { background: rgba(255,255,255,0.06); border-color: var(--line-2); }
.contact-btn:hover svg { color: var(--accent); }
.contact-btn:active, .tg-btn:active { transform: scale(.98); }
.mail-row .contact-btn { padding-right: 60px; }
.mail-row .copy-btn { width: 44px; height: 44px; right: 8px; }

/* Phones: dock to the bottom as a sheet, thumbs reach every button */
@media (max-width: 640px) {
  .modal.modal-tg {
    width: 100%; max-width: none;
    margin: auto 0 0;
    padding: 36px 20px calc(20px + env(safe-area-inset-bottom)) !important;
    border-radius: 28px 28px 0 0;
    border-bottom: 0;
    transform: translateY(100%);
  }
  .modal.modal-tg[open] { transform: none; }
  @starting-style { .modal.modal-tg[open] { transform: translateY(100%); } }
  .modal-tg h3 { font-size: 38px !important; }
  .modal-tg .modal-sub { font-size: 14px; margin-bottom: 24px; }
  .tg-btn, .contact-btn { height: 58px; font-size: 14.5px; }
}

/* Contact modal entrance: content rises in after the sheet, one beat each.
   Keyframes restart on every showModal() since the dialog leaves display:none. */
@media (prefers-reduced-motion: no-preference) {
  .modal-tg[open] :is(h3, .modal-sub, .contact-actions > *) {
    animation: modal-rise .7s cubic-bezier(.16,1,.3,1) both;
  }
  .modal-tg[open] h3 { animation-delay: .08s; }
  .modal-tg[open] .modal-sub { animation-delay: .14s; }
  .modal-tg[open] .contact-actions > :nth-child(1) { animation-delay: .2s; }
  .modal-tg[open] .contact-actions > :nth-child(2) { animation-delay: .25s; }
  .modal-tg[open] .contact-actions > :nth-child(3) { animation-delay: .3s; }
  .modal-tg[open]::before { animation: modal-glow 1.2s ease-out both; }

  .tg-arrow { transition: translate .35s cubic-bezier(.16,1,.3,1); }
  .tg-btn:hover .tg-arrow { translate: 3px -3px; }
  .contact-btn svg { transition: color .25s, rotate .4s cubic-bezier(.16,1,.3,1); }
  .contact-btn[href^="tel"]:hover svg { rotate: -12deg; }
}
@keyframes modal-rise { from { opacity: 0; translate: 0 18px; } }
@keyframes modal-glow { from { opacity: 0; } }
