:root {
  --paper: #f8fafc;
  --ink: #09182f;
  --muted: #5f6b7b;
  --line: #dce2eb;
  --accent: #0752ff;
  --accent-soft: #b8d0ff;
  --surface: #fff;
  --surface-hover: #eff4ff;
  --surface-subtle: #eef2f8;
  --tag-surface: #e7eeff;
  --process-line: #c1ccdc;
  --button-bg: #09182f;
  --button-text: #f8fafc;
  --brand-blue: #0752ff;
  --team-bg: #09182f;
  --team-text: #f8fafc;
  --team-muted: #b8c4d7;
  --shadow: #09182f0c;
  color-scheme: light;
  --sans: 'DM Sans', Arial, sans-serif;
  --max: 1240px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}
:root[data-theme="dark"] {
  --paper: #0a1220;
  --ink: #edf2fc;
  --muted: #aab8cc;
  --line: #2b3a51;
  --accent: #8aafff;
  --accent-soft: #b8d0ff;
  --surface: #111e31;
  --surface-hover: #182b48;
  --surface-subtle: #0f1b2c;
  --tag-surface: #1d3153;
  --process-line: #354761;
  --button-bg: #edf2fc;
  --button-text: #0a1220;
  --team-bg: #102343;
  --shadow: #00000030;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
body.preferences-ready, .approach, .team-section, .experience-dialog { transition: background-color .25s, color .25s, border-color .25s; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--brand-blue); color: #fff; }
.container { width: min(var(--max), calc(100% - 128px)); margin-inline: auto; }
.skip-link { position: fixed; left: 20px; top: -100px; padding: 12px 20px; background: var(--button-bg); color: var(--button-text); z-index: 100; }
.skip-link:focus { top: 12px; }

/* Navigation */
.site-header { position: relative; z-index: 10; }
.nav-wrap { min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; flex-shrink: 0; line-height: 1; }
.brand-logo { display: block; width: 164px; height: 40px; }
/* Keep the original logo intact on a light surface in the dark theme. */
[data-theme="dark"] .wordmark { background: #f8fafc; padding: 9px 12px; border-radius: 5px; }
.desktop-nav { display: flex; gap: 28px; margin-left: auto; white-space: nowrap; }
.preference-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.preference-controls[hidden] { display: none; }
.preference-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 82px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--ink); font-size: .8125rem; font-weight: 550; line-height: 1.3; cursor: pointer; transition: background .2s, border-color .2s; }
.preference-toggle:hover { background: var(--surface-hover); border-color: var(--accent); }
.theme-icon { flex-shrink: 0; }
.theme-icon-sun, [data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; }
.nav-wrap > .button-small { white-space: nowrap; }
.desktop-nav a { position: relative; font-size: .875rem; font-weight: 500; }
.desktop-nav a::after { content: ''; position: absolute; inset-inline: 0; bottom: -7px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.desktop-nav a:hover::after, .desktop-nav a:focus-visible::after { transform: scaleX(1); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 30px; background: var(--button-bg); color: var(--button-text); font-size: .9375rem; font-weight: 500; padding: 18px 24px; border: 1px solid var(--button-bg); border-radius: 5px; line-height: 1.4; transition: background .2s, color .2s, transform .2s; }
.button:hover { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; transform: translateY(-2px); }
.button span[aria-hidden] { display: inline-block; font-size: 1.25rem; transition: transform .3s var(--ease-out); }
.button:hover span[aria-hidden], .button:focus-visible span[aria-hidden] { transform: translate(3px, -3px); }
.button:active { transform: translateY(0) scale(.98); }
.button-small { padding: 11px 18px; font-size: .875rem; gap: 22px; }
.menu-toggle { display: none; }
.mobile-nav[hidden] { display: none; }
.mobile-nav { padding: 16px 24px 28px; display: grid; gap: 20px; background: var(--paper); border-block: 1px solid var(--line); }
.mobile-nav:not([hidden]) { animation: menu-enter .25s var(--ease-out) both; }
.text-link { font-size: .875rem; font-weight: 500; display: inline-flex; gap: 13px; align-items: center; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Full-width typography leads the page. */
.hero { padding-block: 68px 115px; }
.eyebrow { font-size: .75rem; letter-spacing: .095em; font-weight: 600; line-height: 1.6; margin: 0 0 30px; }
.hero .eyebrow { font-size: .875rem; margin-bottom: 34px; }
.hero h1 { font-size: clamp(5rem, 10.8vw, 9.5rem); font-weight: 650; line-height: 1.06; letter-spacing: -.065em; margin: 0 0 52px; }
html[lang="cs"] .hero h1 { font-size: clamp(4.5rem, 9.4vw, 8.5rem); }
.hero-line { display: block; }
.hero-line-accent { color: var(--accent); }
.hero h1 em, h2 em { font-family: inherit; font-weight: inherit; font-style: normal; letter-spacing: inherit; }
.hero h1 em { display: inline-block; }
.hero-bottom { display: flex; align-items: center; justify-content: space-between; gap: 64px; }
.hero-description { color: var(--muted); max-width: 500px; line-height: 1.65; font-size: 1.375rem; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 24px; }
.hero-actions .button { padding: 20px 28px; font-size: 1.0625rem; white-space: nowrap; }

/* Square cards open experience grouped by service. */
.section { padding-block: 130px; }
#expertise { border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 72px; }
.section-heading .eyebrow { margin-bottom: 24px; }
h2 { font-size: clamp(3rem, 5.4vw, 4.75rem); letter-spacing: -.055em; font-weight: 550; line-height: 1.1; margin: 0; }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.service-card { position: relative; display: flex; flex-direction: column; gap: 20px; aspect-ratio: 1; min-width: 0; padding: clamp(24px, 2.6vw, 36px); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); transition: background .3s, border-color .3s, box-shadow .35s, transform .35s var(--ease-out); }
.service-card:hover { background: var(--surface-hover); border-color: var(--accent); transform: translateY(-6px); box-shadow: 0 16px 32px var(--shadow); }
.service-card:active { transform: translateY(-2px); }
.service-card:focus-within { outline: 3px solid var(--accent); outline-offset: 4px; }
.service-card h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.25; margin: 0; }
.service-trigger { display: block; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.service-trigger::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.service-trigger:focus-visible { outline: none; }
.service-summary { color: var(--muted); font-size: 1rem; line-height: 1.75; margin: 0; }
.service-card-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: auto; padding-top: 16px; color: var(--accent); font-size: .875rem; font-weight: 550; }
.service-card-action > span:last-child { font-size: 1.5rem; line-height: 1; transition: transform .35s var(--ease-out); }
.service-card:hover .service-card-action > span:last-child, .service-card:focus-within .service-card-action > span:last-child { transform: translate(4px, -4px); }

/* Native dialog provides keyboard focus containment and Escape-to-close. */
body.dialog-open { overflow: hidden; }
.experience-dialog { width: min(720px, calc(100% - 40px)); max-height: min(85vh, 900px); max-height: min(85dvh, 900px); margin: auto; padding: clamp(28px, 5vw, 56px); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 30px 100px #09182f33; overflow: auto; overscroll-behavior: contain; }
.experience-dialog::backdrop { background: #09182faa; backdrop-filter: blur(5px); }
.experience-dialog[open] { animation: panel-enter .32s var(--ease-out) both; }
.experience-dialog[open]::backdrop { animation: backdrop-enter .25s ease-out both; }
.experience-dialog.is-closing { animation: panel-leave .16s ease-in both; }
.experience-dialog.is-closing::backdrop { animation: backdrop-leave .16s ease-in both; }
.dialog-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.dialog-heading-row .eyebrow { margin: 0; color: var(--accent); }
.dialog-heading-row form { margin: 0; }
.dialog-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.75rem; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.dialog-close:hover { background: var(--button-bg); color: var(--button-text); }
.experience-dialog h2 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.15; }
.dialog-description { color: var(--muted); margin: 24px 0 36px; line-height: 1.8; }
.experience-empty { padding: 36px 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-subtle); }
.experience-empty h3 { margin: 0 0 12px; font-size: 1.1875rem; font-weight: 550; line-height: 1.4; }
.experience-empty p { margin: 0; color: var(--muted); }
.project-story { border-top: 1px solid var(--line); padding-top: 28px; }
.project-story + .project-story { margin-top: 40px; }
.project-story h3 { margin: 0 0 25px; font-size: 1.5rem; line-height: 1.35; letter-spacing: -.025em; }
.project-summary { margin: 0; color: var(--muted); line-height: 1.8; }
.project-detail { margin-top: 20px; }
.project-detail h4 { margin: 0 0 6px; font-size: .875rem; font-weight: 600; }
.project-detail p { margin: 0; color: var(--muted); white-space: pre-line; }
.project-technologies { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 26px 0 0; }
.project-technologies li { padding: 5px 12px; color: var(--accent); background: var(--tag-surface); border-radius: 4px; font-size: .875rem; }

/* A short overview; service panels contain the full supplied experience. */
.experience { border-top: 1px solid var(--line); }
.experience .section-heading { margin-bottom: 48px; }
.experience-intro { max-width: 620px; margin: 0 0 44px; color: var(--muted); font-size: 1.125rem; }
.experience-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; list-style: none; padding: 0; margin: 0 0 40px; }
.experience-highlights > li { border-top: 2px solid var(--accent); padding-top: 24px; }
.experience-highlights h3 { margin: 0 0 16px; font-size: 1.375rem; font-weight: 600; line-height: 1.35; letter-spacing: -.025em; }
.experience-highlights p { margin: 0; color: var(--muted); line-height: 1.8; }
.experience-overview > .text-link { color: var(--accent); }

/* Approach and team */
.approach { background: var(--surface-subtle); }
.process-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px; }
.process-step { border-top: 1px solid var(--process-line); padding-top: 32px; }
.step-number { display: inline-flex; align-items: center; justify-content: center; background: var(--brand-blue); color: white; width: 36px; height: 36px; border-radius: 50%; font-size: .8125rem; font-weight: 550; margin-bottom: 28px; }
.process-step h3 { font-size: 1.5rem; font-weight: 550; letter-spacing: -.035em; line-height: 1.4; margin: 0 0 18px; }
.process-step p { color: var(--muted); margin: 0; max-width: 280px; line-height: 1.85; }
.team-section { background: var(--team-bg); color: var(--team-text); padding-block: 135px; }
.team-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 100px; align-items: center; }
.team-section .eyebrow { color: var(--accent-soft); margin-bottom: 28px; }
.team-section h2 em { color: var(--accent-soft); }
.team-copy { max-width: 400px; }
.team-copy p { color: var(--team-muted); margin: 0; line-height: 1.85; }
.team-copy p:first-child { color: var(--team-text); font-size: 1.1875rem; line-height: 1.8; margin-bottom: 25px; }

/* Contact */
.contact-section { padding-block: 145px; text-align: center; }
.contact-section .eyebrow { margin-bottom: 30px; }
.contact-section h2 { font-size: clamp(3.2rem, 6.4vw, 5.6rem); }
.contact-action { margin-top: 45px; }
.contact-status { min-height: 1.7em; margin: 12px 0 0; font-size: .875rem; color: var(--muted); }
.contact-action .button { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); cursor: pointer; }
.contact-action .button .copy-email-address { font-size: inherit; transform: none; }
.contact-action .button:hover { background: var(--button-bg); border-color: var(--button-bg); color: var(--button-text); }
.site-footer { border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-block: 45px; }
.footer-top > span { font-size: .875rem; color: var(--muted); }
.footer-bottom { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; padding-block: 26px; color: var(--muted); font-size: .75rem; }

@media (max-width: 1150px) {
  .container { width: calc(100% - 88px); }
  .nav-wrap { gap: 16px; }
  .desktop-nav { gap: 20px; }
  .hero { padding-block: 65px 100px; }
  .services-grid { gap: 20px; }
  .process-grid { gap: 40px; }
  .team-inner { gap: 65px; }
}
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-nav { display: none; }
  .preference-controls { margin-left: auto; }
  .menu-toggle { display: flex; flex-shrink: 0; flex-direction: column; justify-content: center; gap: 6px; border: 0; background: none; width: 32px; height: 44px; padding: 4px; cursor: pointer; }
  .menu-toggle span { height: 1.5px; background: var(--ink); width: 24px; transition: transform .2s; }
  .menu-toggle[aria-expanded=true] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
}
@media (max-width: 850px) {
  .container { width: calc(100% - 64px); }
  .nav-wrap { min-height: 94px; }
  .desktop-nav { gap: 18px; margin-right: 0; }
  .brand-logo { width: 140px; height: 35px; }
  .hero { padding-block: 65px 90px; }
  .hero h1 { font-size: clamp(4.5rem, 10.6vw, 6rem); }
  .hero-bottom { align-items: flex-start; flex-direction: column; gap: 30px; }
  .hero-description { max-width: 520px; font-size: 1.25rem; }
  .section { padding-block: 95px; }
  .section-heading { margin-bottom: 55px; }
  .process-grid { gap: 28px; }
  .team-section { padding-block: 95px; }
  .team-inner { gap: 40px; }
  .contact-section { padding-block: 105px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 32px; }
  .container { width: calc(100% - 48px); }
  .nav-wrap { gap: 10px; min-height: 86px; }
  .nav-wrap > .button-small { display: none; }
  .preference-toggle { min-width: 72px; padding-inline: 9px; }
  .brand-logo { width: 123px; height: 30px; }
  .hero { padding-block: 48px 80px; }
  .eyebrow { letter-spacing: .06em; }
  .hero .eyebrow { font-size: .75rem; margin-bottom: 28px; max-width: 275px; }
  .hero h1 { font-size: clamp(3.5rem, 12vw, 4.8rem); letter-spacing: -.065em; margin-bottom: 34px; }
  html[lang="cs"] .hero h1 { font-size: clamp(2.55rem, 10.2vw, 4.5rem); }
  .hero-description { font-size: 1.125rem; }
  .hero-actions .button { font-size: 1rem; padding: 18px 22px; }
  .section { padding-block: 76px; }
  .section-heading { margin-bottom: 45px; }
  h2 { font-size: clamp(2.65rem, 9.8vw, 3.4rem); }
  .services-grid { grid-template-columns: 1fr; gap: 20px; max-width: 440px; margin-inline: auto; }
  .service-card { padding: 28px; }
  .service-card h3 { font-size: 1.65rem; }
  .experience-dialog { width: calc(100% - 28px); padding: 26px; }
  .experience-empty { padding: 26px 22px; }
  .experience-intro { font-size: 1rem; margin-bottom: 32px; }
  .experience-highlights { grid-template-columns: 1fr; gap: 32px; }
  .process-grid { grid-template-columns: 1fr; gap: 34px; }
  .process-step { position: relative; padding-top: 27px; padding-left: 56px; }
  .step-number { position: absolute; left: 0; top: 27px; margin: 0; }
  .process-step h3 { font-size: 1.4rem; }
  .process-step p { max-width: none; }
  .team-section { padding-block: 80px; }
  .team-inner { grid-template-columns: 1fr; gap: 38px; }
  .team-copy p:first-child { font-size: 1.125rem; }
  .contact-section { padding-block: 85px; }
  .contact-section h2 { font-size: clamp(2.85rem, 10.5vw, 3.5rem); }
  .contact-action { margin-top: 35px; }
  .footer-top { flex-wrap: wrap; padding-block: 34px; gap: 28px; }
  .footer-top > span { order: 3; width: 100%; }
  .footer-bottom { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .nav-wrap { flex-wrap: wrap; padding-block: 18px; gap: 14px; }
  .preference-controls { order: 3; flex-basis: 100%; margin-left: 0; }
  .preference-toggle { flex: 1; }
  .menu-toggle { margin-left: auto; }
}
@media (max-width: 380px) {
  .service-card { padding: 22px; gap: 15px; }
  .service-card h3 { font-size: 1.4rem; }
  .service-summary { font-size: .9375rem; line-height: 1.6; }
  .service-card-action { padding-top: 8px; }
}
/* Finite entrances: no looping motion or hidden content when scripts are unavailable. */
@keyframes hero-enter {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes menu-enter {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes panel-enter {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes panel-leave {
  to { opacity: 0; transform: translateY(12px) scale(.985); }
}
@keyframes backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-leave { to { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow { animation: hero-enter .65s var(--ease-out) both; }
  .hero-line:first-child { animation: hero-enter .85s var(--ease-out) .08s both; }
  .hero-line-accent { animation: hero-enter .85s var(--ease-out) .2s both; }
  .hero-bottom { animation: hero-enter .75s var(--ease-out) .34s both; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .button:hover, .button:active, .service-card:hover, .service-card:active,
  .button:hover span, .button:focus-visible span,
  .service-card:hover .service-card-action > span, .service-card:focus-within .service-card-action > span { transform: none; }
}
