/* =========================================================================
   ISLE — refined dark technical design system
   ========================================================================= */
:root {
  --bg:        #0a0b0d;
  --bg-alt:    #0e0f13;
  --surface:   #131519;
  --surface-2: #181b21;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.14);
  --text:      #f4f5f7;
  --text-dim:  #aab1bd;
  --text-mute: #757c89;
  --accent:    #ef4444;
  --accent-2:  #ff6b6b;
  --accent-dim: rgba(239,68,68,.14);
  --accent-ink: #2a0606;
  --warn:      #f5b544;
  --danger:    #f06363;

  --r-xs: 7px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px; --r-round: 999px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 18px 50px -22px rgba(0,0,0,.7);
  --shadow-accent: 0 18px 60px -24px rgba(239,68,68,.5);

  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1200px;
  --pad: clamp(20px, 5vw, 40px);
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0; }
.accent { color: var(--accent); }
.muted { color: var(--text-dim); }

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

.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 200;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px;
  border-radius: var(--r-sm); font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

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

/* ---------------------------------------------------------------- brand */
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; }
.brand__mark {
  width: 26px; height: 26px; border-radius: 8px; position: relative;
  background: linear-gradient(150deg, var(--accent), #b91c1c);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 4px 14px -4px rgba(239,68,68,.7);
}
.brand__mark::after {
  content: ""; position: absolute; inset: 8px 7px;
  border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink);
  border-bottom-left-radius: 4px; opacity: .85;
}
.brand__text { font-size: 18px; letter-spacing: .14em; font-weight: 800; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px; border-radius: var(--r-round);
  font-weight: 600; font-size: 14.5px; letter-spacing: -.01em;
  border: 1px solid var(--bd); background: transparent; color: var(--text);
  cursor: pointer; transition: transform .18s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), opacity .2s;
  white-space: nowrap;
}
.btn svg { transition: transform .25s var(--ease); }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: var(--shadow-accent); }
.btn--primary:hover { background: var(--accent-2); transform: translateY(-2px); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--ghost { background: rgba(255,255,255,.02); }
.btn--ghost:hover { background: rgba(255,255,255,.06); border-color: var(--line-2); transform: translateY(-2px); }
.btn--ghost:hover svg { transform: translate(2px,-2px); }
.btn--google { background: #fff; color: #1a1a1a; border-color: transparent; }
.btn--google:hover { background: #f1f1f1; transform: translateY(-2px); }
.btn--lg { padding: 15px 26px; font-size: 15.5px; }
.btn--sm { padding: 9px 15px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--danger { color: var(--danger); border-color: rgba(240,99,99,.3); }
.btn--danger:hover { background: rgba(240,99,99,.1); border-color: rgba(240,99,99,.5); }
.btn:active { transform: translateY(0) scale(.985); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
}
.site-header.scrolled {
  background: rgba(10,11,13,.72); backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.site-nav { display: flex; gap: 6px; }
.site-nav__link {
  padding: 8px 14px; border-radius: var(--r-round); font-size: 14.5px; color: var(--text-dim);
  transition: color .2s, background .2s;
}
.site-nav__link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.site-nav__link.is-active { color: var(--text); }
.site-header__actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); width: 42px; height: 42px; border-radius: var(--r-sm); align-items: center; justify-content: center; cursor: pointer; }

.mobile-nav { display: none; }
.mobile-nav__links { display: flex; flex-direction: column; gap: 4px; padding: 8px var(--pad) 24px; }
.mobile-nav__links a { padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--line); }
.mobile-nav__links a.btn { border: none; justify-content: center; margin-top: 12px; }

/* ---------------------------------------------------------------- kicker */
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); margin: 0 0 22px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); animation: pulse 2.4s var(--ease) infinite; }
.status-dot--warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(245,181,68,.16); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding: clamp(48px, 9vw, 110px) 0 60px; overflow: hidden; }
.hero__grid {
  position: absolute; inset: -2px; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 0%, #000 30%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 70% 0%, #000 30%, transparent 72%);
  opacity: .5;
}
.hero__glow {
  position: absolute; z-index: 0; top: -160px; right: -80px; width: 620px; height: 620px; pointer-events: none;
  background: radial-gradient(circle, rgba(239,68,68,.22), transparent 62%); filter: blur(30px);
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.35fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero__title {
  font-size: clamp(40px, 7vw, 82px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800;
  margin: 0 0 24px; max-width: 14ch;
}
.hero__lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-dim); max-width: 52ch; margin: 0 0 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-panel {
  background: linear-gradient(180deg, var(--surface), var(--bg-alt)); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden;
}
.hero-panel__bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.hero-panel__bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #2c2f36; }
.hero-panel__bar .dot:nth-child(1) { background: #f0635f; } .hero-panel__bar .dot:nth-child(2) { background: #f5b544; } .hero-panel__bar .dot:nth-child(3) { background: #34c759; }
.hero-panel__title { margin-left: auto; font-size: 12px; color: var(--text-mute); }
.hero-panel__body { padding: 18px 18px 20px; font-size: 13px; line-height: 2; }
.hero-panel__body p { margin: 0; }
.hero-panel__body .t-dim { color: var(--text-mute); }
.hero-panel__body .t-ok { color: var(--accent-2); display: flex; align-items: center; gap: 8px; }
.hero-panel__metrics { display: flex; gap: 18px; margin-top: 14px !important; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text-dim); flex-wrap: wrap; }
.hero-panel__metrics b { color: var(--text); }

/* marquee */
.marquee { position: relative; z-index: 1; margin-top: clamp(44px, 7vw, 80px); border-block: 1px solid var(--line); padding: 18px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: inline-flex; align-items: center; gap: 26px; white-space: nowrap; animation: marquee 38s linear infinite; }
.marquee__item { font-size: 15px; color: var(--text-dim); }
.marquee__sep { color: var(--accent); opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(60px, 9vw, 120px) 0; position: relative; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section--tight { padding: clamp(40px, 6vw, 70px) 0 clamp(60px, 9vw, 110px); }
.section-head { max-width: 640px; margin-bottom: 54px; }
.section-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head__num { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.section-head__title { font-size: clamp(28px, 4vw, 46px); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; margin: 0; }
.section-head__desc { color: var(--text-dim); font-size: 17px; margin: 16px 0 0; }

/* stats */
.stats { border-bottom: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: clamp(34px,5vw,56px) clamp(16px,2vw,28px); border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; padding-left: 0; }
.stat__value { font-size: clamp(34px, 4.5vw, 52px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.stat__label { margin-top: 12px; font-weight: 500; }
.stat__sub { margin-top: 4px; font-size: 12.5px; color: var(--text-mute); }

/* services */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px; transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.svc-card:hover { transform: translateY(-5px); border-color: var(--line-2); background: var(--surface-2); }
.svc-card__icon {
  width: 50px; height: 50px; border-radius: var(--r); display: grid; place-items: center; margin-bottom: 22px;
  background: var(--accent-dim); color: var(--accent-2); border: 1px solid rgba(239,68,68,.22);
}
.svc-card__title { font-size: 20px; font-weight: 650; margin: 0 0 10px; letter-spacing: -.02em; }
.svc-card__desc { color: var(--text-dim); margin: 0 0 18px; font-size: 15px; }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; }
.tag { font-size: 12px; color: var(--text-dim); border: 1px solid var(--line); border-radius: var(--r-round); padding: 5px 11px; background: rgba(255,255,255,.02); }

/* work */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.work-grid--index { grid-template-columns: repeat(3, 1fr); }
.work-card { grid-column: span 1; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; display: flex; flex-direction: column; }
.work-card--wide { grid-column: span 2; }
.work-card:hover { transform: translateY(-6px); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.work-card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
.work-card--wide .work-card__media { aspect-ratio: 21/9; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.work-card:hover .work-card__media img { transform: scale(1.05); }
.work-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(120% 120% at 20% 0%, rgba(239,68,68,.18), transparent 60%), linear-gradient(135deg, #16181d, #0d0f12); color: var(--text-mute); }
.work-card__placeholder span { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.work-card:nth-child(2) .work-card__placeholder { background: radial-gradient(120% 120% at 80% 10%, rgba(86,224,138,.16), transparent 60%), linear-gradient(135deg, #15181c, #0d0f12); }
.work-card:nth-child(3) .work-card__placeholder { background: radial-gradient(120% 120% at 50% 100%, rgba(239,68,68,.14), transparent 55%), linear-gradient(160deg, #14171b, #0c0e11); }
.work-card__open {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(10,11,13,.6); backdrop-filter: blur(6px);
  border: 1px solid var(--line-2); color: var(--text); opacity: 0; transform: translateY(-6px); transition: .3s var(--ease);
}
.work-card:hover .work-card__open { opacity: 1; transform: translateY(0); }
.work-card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work-card__meta { display: flex; gap: 14px; font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.work-card__meta span:not(:first-child) { color: var(--text-mute); }
.work-card__title { font-size: clamp(20px, 2.4vw, 27px); font-weight: 680; letter-spacing: -.025em; margin: 0; }
.work-card__summary { color: var(--text-dim); margin: 0; font-size: 15px; }
.work-card__metrics { display: flex; flex-wrap: wrap; gap: 18px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.metric { font-size: 13px; color: var(--text-mute); }
.metric b { color: var(--text); font-weight: 700; font-size: 15px; }

/* approach */
.approach { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(34px, 6vw, 90px); align-items: start; }
.approach__intro { position: sticky; top: 100px; }
.approach__body { margin-top: 18px; }
.approach__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.approach__item { display: flex; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line); }
.approach__item:last-child { border-bottom: 1px solid var(--line); }
.approach__num { color: var(--accent); font-size: 14px; padding-top: 4px; min-width: 28px; }
.approach__item h3 { margin: 0 0 8px; font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.approach__item p { margin: 0; color: var(--text-dim); }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.team-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; transition: transform .3s var(--ease), border-color .3s; }
.team-card:hover { transform: translateY(-5px); border-color: var(--line-2); }
.team-card__avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--accent-dim); display: grid; place-items: center; margin-bottom: 18px; border: 1px solid rgba(239,68,68,.25); }
.team-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card__initials { font-weight: 700; color: var(--accent-2); font-size: 22px; }
.team-card__name { font-size: 18px; font-weight: 650; margin: 0; letter-spacing: -.02em; }
.team-card__role { font-size: 12.5px; color: var(--accent); margin: 5px 0 12px; }
.team-card__bio { color: var(--text-dim); font-size: 14px; margin: 0 0 16px; }
.team-card__links { display: flex; gap: 8px; }
.team-card__links a { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; border: 1px solid var(--line); color: var(--text-dim); transition: .2s; }
.team-card__links a:hover { color: var(--text); border-color: var(--line-2); background: rgba(255,255,255,.04); }

/* contact */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.contact__lead { position: sticky; top: 100px; }
.contact__body { color: var(--text-dim); font-size: 17px; margin: 16px 0 26px; max-width: 42ch; }
.contact__email { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 15px; padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--r-round); transition: .2s; }
.contact__email:hover { border-color: var(--accent); color: var(--accent-2); }

.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 13.5px; font-weight: 500; color: var(--text-dim); }
.field__opt { color: var(--text-mute); font-weight: 400; }
.input {
  width: 100%; background: var(--bg-alt); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--text); font: inherit; font-size: 15px; padding: 13px 15px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--text-mute); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); background: var(--surface); }
textarea.input { resize: vertical; min-height: 90px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23757c89' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form__note { font-size: 12px; color: var(--text-mute); text-align: center; margin: 2px 0 0; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(50px, 8vw, 90px); background: var(--bg-alt); }
.footer-cta { padding-bottom: 50px; border-bottom: 1px solid var(--line); margin-bottom: 50px; }
.footer-cta__kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 18px; }
.footer-cta__title { display: block; font-size: clamp(30px, 6vw, 70px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; max-width: 16ch; transition: opacity .2s; }
.footer-cta__title:hover { opacity: .7; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; padding-bottom: 50px; }
.footer-brand__tag { color: var(--text-dim); max-width: 34ch; margin: 18px 0 22px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-dim); transition: .2s; }
.footer-social a:hover { color: var(--text); border-color: var(--line-2); background: rgba(255,255,255,.04); transform: translateY(-2px); }
.footer-col h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mute); margin: 0 0 16px; font-weight: 600; }
.footer-col a { display: block; color: var(--text-dim); padding: 6px 0; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px 0; border-top: 1px solid var(--line); color: var(--text-mute); font-size: 12.5px; }

/* ---------------------------------------------------------------- page hero / case */
.page-hero { position: relative; padding: clamp(60px, 10vw, 120px) 0 clamp(30px,5vw,50px); overflow: hidden; }
.page-hero__title { font-size: clamp(34px, 6vw, 66px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; margin: 0 0 20px; }
.page-hero__desc { color: var(--text-dim); font-size: 18px; max-width: 56ch; margin: 0; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 40px; }
.chip { background: rgba(255,255,255,.02); border: 1px solid var(--line); color: var(--text-dim); padding: 8px 16px; border-radius: var(--r-round); font-size: 13px; cursor: pointer; transition: .2s; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }

.case { position: relative; padding-top: clamp(40px, 7vw, 80px); overflow: hidden; }
.back-link, .back-mini { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 13.5px; transition: color .2s; }
.back-link:hover { color: var(--accent-2); }
.case__head { max-width: 880px; margin: 26px 0 40px; }
.case__meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--accent); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 22px; }
.case__meta span:not(:first-child) { color: var(--text-mute); }
.case__title { font-size: clamp(34px, 6vw, 68px); font-weight: 800; letter-spacing: -.035em; line-height: 1.03; margin: 0 0 22px; }
.case__summary { font-size: clamp(17px, 2vw, 22px); color: var(--text-dim); margin: 0; max-width: 60ch; }
.case__metrics { display: flex; flex-wrap: wrap; gap: clamp(24px,5vw,60px); padding: 30px 0; border-block: 1px solid var(--line); }
.case-metric__value { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; }
.case-metric__label { color: var(--text-mute); font-size: 12.5px; margin-top: 6px; text-transform: uppercase; letter-spacing: .06em; }
.case__cover { margin: 44px 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/8; }
.case__cover img { width: 100%; height: 100%; object-fit: cover; }
.case__layout { display: grid; grid-template-columns: 1fr 300px; gap: clamp(34px, 6vw, 70px); padding: 30px 0 70px; align-items: start; }
.case__aside { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 22px; }
.aside-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mute); margin: 0 0 12px; }
.aside-dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.aside-dl > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.aside-dl dt { color: var(--text-mute); font-size: 14px; } .aside-dl dd { margin: 0; font-size: 14px; }

.next-project { display: block; border-top: 1px solid var(--line); background: var(--bg-alt); transition: background .3s; }
.next-project:hover { background: var(--surface); }
.next-project__inner { padding: clamp(40px,7vw,80px) var(--pad); }
.next-project__label { color: var(--text-mute); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; }
.next-project__title { display: flex; align-items: center; gap: 16px; font-size: clamp(28px, 5vw, 54px); font-weight: 800; letter-spacing: -.03em; margin-top: 14px; }
.next-project:hover .next-project__title { color: var(--accent-2); }

/* prose (markdown) */
.prose { color: var(--text-dim); font-size: 16.5px; line-height: 1.75; }
.prose h2 { color: var(--text); font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 38px 0 14px; }
.prose h3 { color: var(--text); font-size: 20px; font-weight: 650; margin: 30px 0 12px; }
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--accent-2); }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; overflow-x: auto; margin: 0 0 22px; }
.prose pre code { background: none; border: none; padding: 0; color: var(--text); }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: 18px; margin: 0 0 22px; color: var(--text); }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 30px 0; }

.empty { text-align: center; color: var(--text-mute); padding: 60px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* ---------------------------------------------------------------- auth shell */
.auth-shell { min-height: 100dvh; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.auth-brand { position: absolute; top: 30px; left: var(--pad); z-index: 2; }
.auth-wrap { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 90px var(--pad) 40px; gap: 20px; }
.auth-card { width: 100%; max-width: 440px; background: linear-gradient(180deg, var(--surface), var(--bg-alt)); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 44px); box-shadow: var(--shadow-2); }
.auth-card__title { font-size: clamp(26px, 4vw, 34px); font-weight: 750; letter-spacing: -.03em; margin: 0 0 12px; }
.auth-card__desc { color: var(--text-dim); margin: 0 0 26px; }
.auth-card__foot { margin: 24px 0 0; font-size: 12px; color: var(--text-mute); text-align: center; }
.auth-back { display: inline-flex; align-items: center; gap: 8px; color: var(--text-mute); font-size: 13px; transition: color .2s; }
.auth-back:hover { color: var(--text); }
.notice { display: flex; gap: 13px; padding: 16px; border: 1px solid var(--line-2); background: rgba(255,255,255,.02); border-radius: var(--r); color: var(--text-dim); font-size: 13.5px; }
.notice strong { color: var(--text); display: block; margin-bottom: 3px; }
.notice code { font-family: var(--font-mono); font-size: .85em; color: var(--accent-2); }
.notice svg { flex-shrink: 0; color: var(--warn); }
.dev-login { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.dev-login__title { font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .1em; margin: 0; }
.pending-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border: 1px solid var(--line-2); border-radius: var(--r); margin: 0 0 22px; font-size: 13.5px; }
.pending-card span:first-child { display: inline-flex; align-items: center; gap: 9px; }
.error-box { text-align: center; max-width: 460px; }
.error-code { font-size: 15px; color: var(--accent); letter-spacing: .2em; margin: 0 0 14px; }

.pill { display: inline-flex; align-items: center; font-size: 11px; padding: 3px 9px; border-radius: var(--r-round); border: 1px solid var(--line-2); color: var(--text-dim); }
.pill--accent { background: var(--accent-dim); color: var(--accent-2); border-color: rgba(239,68,68,.3); }
.pill--ok { background: rgba(239,68,68,.12); color: var(--accent-2); border-color: rgba(239,68,68,.28); }
.pill--warn { background: rgba(245,181,68,.12); color: var(--warn); border-color: rgba(245,181,68,.3); }
.pill--muted { color: var(--text-mute); }

/* ---------------------------------------------------------------- flash toast */
.flash {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(0);
  z-index: 300; display: flex; align-items: center; gap: 12px; max-width: min(92vw, 460px);
  padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-2); animation: flash-in .4s var(--ease);
}
.flash--success { border-color: rgba(239,68,68,.4); }
.flash--error { border-color: rgba(240,99,99,.45); }
.flash__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }
.flash--success .flash__icon { background: var(--accent-dim); color: var(--accent-2); }
.flash--error .flash__icon { background: rgba(240,99,99,.16); color: var(--danger); }
.flash__msg { font-size: 14px; }
.flash__close { background: none; border: none; color: var(--text-mute); cursor: pointer; display: grid; place-items: center; padding: 4px; margin-left: auto; }
.flash__close:hover { color: var(--text); }
@keyframes flash-in { from { opacity: 0; transform: translateX(-50%) translateY(16px); } }
.flash.hide { opacity: 0; transform: translateX(-50%) translateY(16px); transition: .3s var(--ease); }

/* ---------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .site-nav, .site-header__actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav { display: block; max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); border-top: 1px solid transparent; }
  .mobile-nav.open { max-height: 460px; border-top-color: var(--line); background: rgba(10,11,13,.96); backdrop-filter: blur(14px); }
  .site-header.menu-open { background: rgba(10,11,13,.96); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero-panel { max-width: 460px; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: none; padding-left: 0; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .work-grid, .work-grid--index { grid-template-columns: 1fr 1fr; }
  .work-card--wide { grid-column: span 2; }
  .approach { grid-template-columns: 1fr; } .approach__intro { position: static; }
  .contact { grid-template-columns: 1fr; } .contact__lead { position: static; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .case__layout { grid-template-columns: 1fr; } .case__aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
  .work-grid, .work-grid--index { grid-template-columns: 1fr; }
  .work-card--wide { grid-column: span 1; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .case__aside { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}

/* ---------------------------------------------------------------- language switch */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-round); background: rgba(255,255,255,.02); }
.lang-switch__opt { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--text-mute); padding: 5px 9px; border-radius: var(--r-round); transition: color .2s, background .2s; }
.lang-switch__opt:hover { color: var(--text); }
.lang-switch__opt.is-active { color: var(--accent-ink); background: var(--accent); }
.lang-switch--mobile { margin: 14px 0 4px; }
@media (max-width: 960px) {
  .site-header__actions .lang-switch { display: none; }
}
