/* Medkiro — base: tokens, typography, layout, navigation, buttons */
:root {
  --bg: #fbfbfd;
  --bg-elev: #ffffff;
  --bg-grouped: #f2f2f7;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.2);
  --text: #1d1d1f;
  --text-2: #515154;
  --text-3: #86868b;
  --sep: rgba(60, 60, 67, 0.14);
  --blue: #007aff;
  --teal: #2ec4b6;
  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;
  --pink: #ff2d55;
  --purple: #af52de;
  --indigo: #5856d6;
  --yellow: #ffcc00;
  --brand: linear-gradient(135deg, #0a84ff 0%, #2ed3b7 100%);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.05), 0 18px 48px rgba(0, 0, 0, 0.1);
  --shadow-3: 0 30px 80px rgba(0, 40, 90, 0.18);
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
  --r-xl: 36px;
  --wrap: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elev: #1c1c1e;
    --bg-grouped: #111113;
    --fill: rgba(120, 120, 128, 0.24);
    --fill-2: rgba(120, 120, 128, 0.36);
    --text: #f5f5f7;
    --text-2: #c7c7cc;
    --text-3: #8e8e93;
    --sep: rgba(84, 84, 88, 0.55);
    --blue: #0a84ff;
    --green: #30d158;
    --orange: #ff9f0a;
    --red: #ff453a;
    --glass: rgba(28, 28, 30, 0.72);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 48px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.022em; }
h1 { font-size: clamp(42px, 6.4vw, 80px); line-height: 1.03; font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.07; font-weight: 700; letter-spacing: -0.03em; }
h3 { font-size: 22px; line-height: 1.2; font-weight: 650; }
h4 { font-size: 17px; font-weight: 650; }
p { margin: 0; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.section { padding: clamp(64px, 8vw, 110px) 0; position: relative; }
.section.tint { background: var(--bg-grouped); }
.section-head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.section-head p { margin-top: 18px; font-size: clamp(18px, 1.9vw, 21px); color: var(--text-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  color: var(--blue); margin-bottom: 14px;
}
.grad-text {
  background: var(--brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.muted { color: var(--text-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 26px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 17px; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 24px rgba(0, 122, 255, 0.32); }
.btn-primary:hover { box-shadow: 0 12px 32px rgba(0, 122, 255, 0.42); transform: translateY(-1px); }
.btn-ghost { background: var(--fill); color: var(--text); }
.btn-ghost:hover { background: var(--fill-2); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 15px; }
.link-arrow { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow::after { content: "›"; font-size: 1.3em; line-height: 1; transition: transform 0.2s; }
.link-arrow:hover::after { transform: translateX(3px); }

/* Navigation — frosted glass bar */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--sep); }
.nav-inner { height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--text-2); font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; margin-left: auto; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; border-radius: 10px; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 5px auto; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 18px;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--sep);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.25s, transform 0.3s var(--ease);
  }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 4px; font-size: 17px; border-bottom: 0.5px solid var(--sep); }
  .nav-cta { display: none; }
}

/* Cards & chips */
.card {
  background: var(--bg-elev); border-radius: var(--r-l);
  box-shadow: var(--shadow-1); padding: 28px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--fill); font-size: 13px; font-weight: 600; color: var(--text-2);
}
.chip.blue { background: rgba(0, 122, 255, 0.12); color: var(--blue); }
.chip.green { background: rgba(52, 199, 89, 0.14); color: #1f9d48; }
.chip.orange { background: rgba(255, 149, 0, 0.14); color: #c76f00; }
.chip.red { background: rgba(255, 59, 48, 0.12); color: var(--red); }
@media (prefers-color-scheme: dark) {
  .chip.green { color: var(--green); }
  .chip.orange { color: var(--orange); }
}

/* App-icon style tiles */
.app-icon {
  width: 52px; height: 52px; border-radius: 13px; flex: none;
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.12);
}
.app-icon svg { width: 28px; height: 28px; }
.app-icon.sm { width: 34px; height: 34px; border-radius: 9px; }
.app-icon.sm svg { width: 19px; height: 19px; }
.bg-blue { background: linear-gradient(180deg, #3d9bff, #0066e6); }
.bg-teal { background: linear-gradient(180deg, #4fdcc9, #1ba897); }
.bg-green { background: linear-gradient(180deg, #5ee07f, #21a84a); }
.bg-orange { background: linear-gradient(180deg, #ffb340, #ff8000); }
.bg-red { background: linear-gradient(180deg, #ff6b61, #e0261b); }
.bg-pink { background: linear-gradient(180deg, #ff6584, #e3133f); }
.bg-purple { background: linear-gradient(180deg, #cf7cf0, #9a3fc9); }
.bg-indigo { background: linear-gradient(180deg, #7d7bf0, #4441c4); }
.bg-yellow { background: linear-gradient(180deg, #ffd84d, #f5b400); }
.bg-gray { background: linear-gradient(180deg, #a1a1a6, #6e6e73); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

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

/* Footer */
.footer { padding: 48px 0 56px; border-top: 0.5px solid var(--sep); font-size: 14px; color: var(--text-3); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; justify-content: space-between; }
.footer a { color: var(--text-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer small { display: block; margin-top: 18px; max-width: 760px; line-height: 1.6; }
