/* === [S01.9] Shell: design tokens, reset and base typography === */
:root {
  --ez-blue: #005BFC;
  --ez-blue-press: #0047C8;
  --ez-blue-soft: #6FA0FF;
  --ez-accent: #3D7BF2;
  --ez-ink: #111011;
  --ez-night: #070A10;
  --ez-sheet: #11151C;
  --ez-tile: #1A202A;
  --ez-line: #2A3240;
  --ez-text: #F2F5F9;
  --ez-muted: #8C96A8;
  --ez-paper: #FFFFFF;
  --ez-paper-2: #F5F7FA;
  --ez-text-dark: #111827;
  --ez-muted-dark: #4B5563;
  --ez-green: #34C77B;
  --ez-red: #FF6B6B;
  --ez-amber: #FFB547;
  --ez-glow: radial-gradient(60% 60% at 50% 40%, rgba(0, 91, 252, .45), transparent 70%);
  --ez-grad: linear-gradient(135deg, #005BFC 0%, #6FA0FF 100%);
  --ez-r-sm: 12px;
  --ez-r-md: 18px;
  --ez-r-lg: 28px;
  --ez-r-pill: 999px;
  --ez-font: Inter, "Noto Sans Sinhala", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ez-font-si: "Noto Sans Sinhala", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ez-header-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--ez-header-h) + 16px);
  background: var(--ez-night);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ez-night);
  color: var(--ez-text);
  font-family: var(--ez-font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 80vh;
  background: var(--ez-glow);
  pointer-events: none;
  z-index: -1;
  opacity: .8;
}
body.shell-menu-open { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
main { display: block; }
:focus-visible { outline: 3px solid var(--ez-blue-soft); outline-offset: 3px; border-radius: 6px; }

html[lang=si] body {
  font-family: var(--ez-font-si);
  line-height: 1.7;
}

/* === [S01.10] Shell: layout, typography and buttons === */
.shell-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}
.shell-section { position: relative; padding-block: clamp(64px, 9vw, 120px); }
.shell-section--dark { background: var(--ez-night); color: var(--ez-text); }
.shell-section--light { background: var(--ez-paper); color: var(--ez-text-dark); }
.shell-section--light .shell-lead { color: var(--ez-muted-dark); }
.shell-section--light .shell-card { background: var(--ez-paper-2); border-color: #DDE3EC; color: var(--ez-text-dark); }

.shell-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ez-blue-soft);
}
.shell-section--light .shell-eyebrow { color: var(--ez-blue); }
.shell-h1 {
  font-size: clamp(2.4rem, 1.4rem + 4.6vw, 4.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.035em;
  margin-bottom: 20px;
  text-wrap: balance;
}
.shell-h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.025em;
  margin-bottom: 16px;
  text-wrap: balance;
}
.shell-lead {
  font-size: clamp(1.05rem, .95rem + .5vw, 1.25rem);
  color: var(--ez-muted);
  max-width: 60ch;
  line-height: 1.6;
}
.shell-grad-text {
  background: var(--ez-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[lang=si] .shell-h1,
html[lang=si] .shell-h2 { letter-spacing: 0; line-height: 1.3; }
html[lang=si] .shell-eyebrow { letter-spacing: .02em; text-transform: none; }

.shell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--ez-r-pill);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.shell-btn:hover { transform: translateY(-2px); }
.shell-btn:active { transform: translateY(0); }
.shell-btn--primary {
  background: var(--ez-blue);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(0, 91, 252, .7);
}
.shell-btn--primary:hover { background: var(--ez-blue-press); box-shadow: 0 16px 36px -12px rgba(0, 91, 252, .85); }
.shell-btn--ghost {
  background: transparent;
  color: var(--ez-text);
  border-color: var(--ez-line);
}
.shell-btn--ghost:hover { border-color: var(--ez-blue-soft); }
.shell-btn--whatsapp { background: #25D366; color: #06210F; box-shadow: 0 12px 30px -14px rgba(37, 211, 102, .8); }
.shell-btn--whatsapp:hover { background: #20BD5A; }
.shell-section--light .shell-btn--ghost { color: var(--ez-text-dark); border-color: #C9D1DD; }

.shell-glass {
  background: rgba(26, 32, 42, .55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(140, 150, 168, .18);
  border-radius: var(--ez-r-lg);
}
.shell-card {
  background: var(--ez-tile);
  border: 1px solid var(--ez-line);
  border-radius: var(--ez-r-md);
  padding: 24px;
}
.shell-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--ez-line);
  border-radius: var(--ez-r-pill);
  background: rgba(26, 32, 42, .6);
  color: var(--ez-muted);
  font-size: .875rem;
}
.shell-icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* === [S01.11] Shell: motion (reveal, reduced motion) === */
html.shell-js .shell-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--shell-delay, 0ms);
}
html.shell-js .shell-reveal.is-visible { opacity: 1; transform: none; }
.shell-skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--ez-r-pill);
  background: var(--ez-blue);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.shell-skip:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html.shell-js .shell-reveal { opacity: 1; transform: none; }
  .shell-btn:hover { transform: none; }
}

/* === [S01.12] Shell: header, mobile menu sheet and language switch === */
.shell-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
  border-bottom: 1px solid transparent;
}
.shell-header.is-scrolled {
  background: rgba(7, 10, 16, .72);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: var(--ez-line);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .8);
}
.shell-header__inner {
  height: var(--ez-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.shell-header__brand img { height: 34px; width: auto; }
.shell-header__nav { display: none; }
.shell-header__actions { display: flex; align-items: center; gap: 10px; }
.shell-header__cta { display: none; min-height: 44px; padding: 0 18px; }
.shell-lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ez-line);
  border-radius: var(--ez-r-pill);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ez-text);
  transition: border-color .2s ease;
}
.shell-lang:hover { border-color: var(--ez-blue-soft); }
.shell-lang--block { justify-content: center; min-height: 48px; }
.shell-menu-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--ez-line);
  border-radius: 14px;
  background: rgba(26, 32, 42, .6);
  cursor: pointer;
}
.shell-menu-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 3px 0;
  border-radius: 2px;
  background: var(--ez-text);
  transition: transform .25s ease, opacity .25s ease;
}
.shell-menu-toggle[aria-expanded=true] .shell-menu-toggle__bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.shell-menu-toggle[aria-expanded=true] .shell-menu-toggle__bar:nth-child(2) { opacity: 0; }
.shell-menu-toggle[aria-expanded=true] .shell-menu-toggle__bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
/* Header and toggle stay above the open sheet (sheet is z-index 60). */
body.shell-menu-open .shell-header { z-index: 70; background: var(--ez-night); }

.shell-menu-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: calc(var(--ez-header-h) + 16px) 20px calc(32px + env(safe-area-inset-bottom));
  background: var(--ez-night);
  overflow-y: auto;
  animation: shell-sheet-in .25s ease both;
}
.shell-menu-sheet[hidden] { display: none !important; }
.shell-menu-sheet__nav { display: flex; flex-direction: column; }
.shell-menu-sheet__link {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--ez-line);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}
.shell-menu-sheet__actions { display: flex; flex-direction: column; gap: 12px; }
@keyframes shell-sheet-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* === [S01.13] Shell: footer, mobile dock and responsive layout === */
.shell-footer {
  background: #05070C;
  border-top: 1px solid var(--ez-line);
  padding-block: 56px 28px;
  color: var(--ez-muted);
  font-size: .95rem;
}
.shell-footer__grid { display: grid; gap: 32px; }
.shell-footer__brand img { height: 36px; width: auto; }
.shell-footer__brand p { margin-top: 16px; max-width: 34ch; }
.shell-footer__heading {
  margin-bottom: 14px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ez-text);
}
html[lang=si] .shell-footer__heading { letter-spacing: 0; text-transform: none; }
.shell-footer__list { display: grid; gap: 10px; }
.shell-footer__list a { display: inline-flex; min-height: 32px; align-items: center; text-decoration: none; }
.shell-footer__list a:hover { color: var(--ez-text); text-decoration: underline; }
.shell-footer__bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--ez-line);
  font-size: .875rem;
  text-align: center;
}
.shell-footer__credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  margin: 0;
  line-height: 1.6;
}
.shell-footer__dev a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color .2s ease;
}
.shell-footer__dev a:hover,
.shell-footer__dev a:focus-visible { text-decoration-color: currentColor; }
.shell-footer__sep { opacity: .6; }
.shell-footer__copy { display: inline; }

.shell-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(7, 10, 16, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--ez-line);
}
.shell-dock .shell-btn { flex: 1 1 0; min-width: 0; padding: 0 14px; }
.shell-dock .shell-btn span { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 639px) {
  .shell-footer__sep { display: none; }
  .shell-footer__copy { flex-basis: 100%; }
}
@media (min-width: 640px) {
  .shell-container { padding-inline: 28px; }
  .shell-header__cta { display: inline-flex; }
  .shell-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .shell-header__nav { display: flex; align-items: center; gap: 22px; font-size: .95rem; font-weight: 500; }
  .shell-header__nav a { text-decoration: none; color: var(--ez-muted); transition: color .2s ease; }
  .shell-header__nav a:hover { color: var(--ez-text); }
  .shell-menu-toggle { display: none; }
  .shell-menu-sheet { display: none !important; }
  .shell-dock { display: none; }
  .shell-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
}
@media (min-width: 1280px) {
  .shell-container { padding-inline: 32px; }
  .shell-header__nav { gap: 28px; }
}
