/* ilmri bookkeeping · light theme · site v0.11
   Matches ilmri.com v0.11 light + hero design system. */

:root {
  --bg: #FFFFFF;
  --bg-elev: #F5F5F5;
  --ink: #0D0D0D;
  --muted: #5C5C5C;
  --faint: #8A8A8A;
  --line: #E6E6E6;
  --line-strong: #C8C8C8;
  --teal: #0D6E7A;
  --teal-soft: rgba(13, 110, 122, 0.08);
  --teal-border: rgba(13, 110, 122, 0.35);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --maxw: 1120px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--teal); color: #fff; }
.kw { color: var(--teal); }
a { color: inherit; text-decoration: none; }

.wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand img { height: 36px; width: auto; display: block; }

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.btn-signin {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-pill);
  transition: opacity 0.2s var(--ease);
}

.btn-signin:hover { opacity: 0.9; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }

.hero {
  position: relative;
  flex: 1;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: center;
  padding: 100px 0 88px;
  overflow: hidden;
}

.hero-inner {
  max-width: 44rem;
  position: relative;
  z-index: 2;
}

.hero-geom {
  position: absolute;
  right: -8%;
  top: 50%;
  width: min(48vw, 480px);
  height: min(48vw, 480px);
  margin-top: calc(min(48vw, 480px) / -2);
  pointer-events: none;
  opacity: 0.04;
  z-index: 1;
}

.hero-geom svg {
  width: 100%;
  height: 100%;
  stroke: var(--ink);
  fill: none;
  stroke-width: 0.6;
}

.hero h1 {
  font-weight: 300;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}

.hero-lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  max-width: 42ch;
  line-height: 1.5;
  margin-bottom: 24px;
}

.hero-modules {
  font-family: var(--mono);
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: 0.04em;
  color: var(--faint);
  line-height: 1.7;
  max-width: 52ch;
  margin-bottom: 20px;
}

.hero-powered {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 36px;
}

.btn-choose {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 24px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-choose:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-choose svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

footer {
  margin-top: auto;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.foot .brand img { height: 30px; }
.foot p { font-size: 14px; color: var(--faint); }
.foot-links { display: flex; gap: 24px; }
.foot-links a { font-size: 14px; color: var(--faint); }
.foot-links a:hover { color: var(--ink); }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  width: 100%;
  max-width: 640px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s var(--ease);
  position: relative;
}

.modal-overlay.open .modal { transform: none; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { color: var(--ink); border-color: var(--line-strong); }

.modal h3 {
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.modal .sub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.modal-panel { display: none; }
.modal-panel.active { display: block; }

.country-grid-scroll {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  margin-right: -4px;
  padding-right: 4px;
}

.country-grid-scroll::-webkit-scrollbar { width: 6px; }
.country-grid-scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--radius-pill);
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.country-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  font: inherit;
  color: inherit;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
  text-align: center;
}

.country-tile:hover:not(.is-soon) {
  border-color: var(--teal-border);
  background: var(--teal-soft);
  transform: translateY(-2px);
}

.country-tile.is-soon {
  opacity: 0.5;
  cursor: not-allowed;
}

.country-tile .flag {
  width: 56px;
  height: 38px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.country-tile .flag svg { width: 100%; height: 100%; display: block; }

.country-tile .name {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.country-tile .status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.country-tile.is-soon .status { color: var(--muted); }

.uae-confirm {
  text-align: center;
  padding: 8px 0 4px;
}

.uae-flag-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.uae-flag-wrap .flag-large {
  width: 120px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  animation: flag-in 0.45s var(--ease);
}

.uae-flag-wrap .flag-large svg { width: 100%; height: 100%; display: block; }

.uae-flag-wrap::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 12px;
  border: 1px solid var(--teal-border);
  opacity: 0;
  animation: ring-pulse 1.8s ease-out 0.2s infinite;
}

@keyframes flag-in {
  from { opacity: 0; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes ring-pulse {
  0% { opacity: 0.6; transform: scale(0.96); }
  100% { opacity: 0; transform: scale(1.08); }
}

.uae-confirm h4 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.uae-confirm p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.btn-back {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--body);
}

.btn-back:hover { color: var(--ink); }

.btn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: var(--body);
  font-weight: 500;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s var(--ease);
}

.btn-continue:hover { opacity: 0.9; }

@media (max-width: 760px) {
  .hero-geom { display: none; }
  .country-grid { grid-template-columns: repeat(2, 1fr); }
  .wrap { padding: 0 24px; }
}

@media (max-width: 420px) {
  .country-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .uae-flag-wrap::after { display: none; }
}
