/* ============================================================
   Jarrly — Complete redesign
   Space Grotesk · Emerald palette · Flat/editorial layout
   ============================================================ */

/* ---- Self-hosted fonts ---- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/SpaceGrotesk-Latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/JetBrainsMono-Latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Tokens ---- */
:root {
  --bg:         #fafafa;
  --bg-alt:     #ffffff;
  --bg-dark:    #111110;
  --border:     #e4e4e3;
  --text:       #1c1c1a;
  --text-mid:   #5c5c58;
  --text-light: #9c9c96;
  --accent:     #059669;        /* Emerald */
  --accent-light:#d1fae5;
  --accent-dark: #047857;
  --font:       'Space Grotesk', system-ui, sans-serif;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;
  --max-w:      1120px;
  --nav-h:      56px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Layout ---- */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}

/* ---- Shared ---- */
/* EEMRIO hero badge */
.eemrio-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-dark);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.eemrio-hero__badge svg { color: var(--accent); }

.tag {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

/* ============================================================
   NAV — simple bar, no glassmorphism
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
}

.nav__wordmark {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text);
}

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  transition: color 0.15s;
}
.nav__link:hover { color: var(--text); }
.nav__link--active { color: var(--accent); }

/* Tools dropdown */
.nav__dropdown {
  position: relative;
}
.nav__dropdown-toggle {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  transition: color 0.15s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}
.nav__dropdown-toggle::after {
  content: ' ▾';
  font-size: 10px;
}
.nav__dropdown-toggle:hover { color: var(--text); }
.nav__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding-top: 20px;
  padding-bottom: 8px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 200;
}
.nav__dropdown:hover .nav__dropdown-menu,
.nav__dropdown-menu:hover,
.nav__dropdown.is-open .nav__dropdown-menu {
  opacity: 1;
  pointer-events: auto;
}
.nav__dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav__dropdown-menu a:hover {
  background: var(--accent-light, #ecfdf5);
  color: var(--accent);
}

/* Mobile tools sub-list */
.mobile-menu__tools {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 16px;
  margin-top: 8px;
}
.mobile-menu__tools a {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-mid);
}
.mobile-menu__tools a:hover { color: var(--accent); }

/* Burger — two lines, not three */
.nav__burger {
  display: none;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 4px;
}
.nav__burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.2s;
}
.nav__burger[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}
.nav__burger[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Lock body scroll on iOS when menu is open */
body.menu-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

/* Mobile overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  -webkit-overflow-scrolling: touch;
  touch-action: none;
  overscroll-behavior: contain;
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 32px; text-align: center; }
.mobile-menu__link {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
}
.mobile-menu__link:hover { color: var(--accent); }

/* ============================================================
   HERO — two-column: text left, terminal right
   ============================================================ */
.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero__text h1 {
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}

.hero__sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-mid);
  max-width: 44ch;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Primary button — flat, solid, no shadow */
.btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 24px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-dark); }

.link-arrow {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.link-arrow:hover { gap: 8px; }

/* Terminal block */
.term {
  background: var(--bg-dark);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a2a28;
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: #1a1a18;
  border-bottom: 1px solid #2a2a28;
}

.term__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.term__dot--r { background: #ef4444; }
.term__dot--y { background: #eab308; }
.term__dot--g { background: #22c55e; }

.term__title {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: #6b6b66;
}

.term__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.term__body code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: #e4e4e3;
  white-space: pre-wrap;
}

.t-prompt { color: var(--accent); font-weight: 500; }
.t-muted  { color: #6b6b66; }
.t-ok     { color: #22c55e; }
.t-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   ABOUT — editorial two-column
   ============================================================ */
.about {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 8px;
}

.about__lead h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.about__body p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-mid);
  margin-bottom: 16px;
}
.about__body p:last-child { margin-bottom: 0; }

/* ============================================================
   FEATURES — numbered list, 2×2 grid
   ============================================================ */
.features {
  padding: 96px 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.features__heading {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.feat {
  padding: 36px 32px;
  background: var(--bg-alt);
}

.feat__num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}

.feat h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.feat p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-mid);
}

.feat--soon {
  background: var(--bg);
}
.feat--soon h3 { color: var(--text-light); }
.feat--soon p { color: var(--text-light); }
.feat--soon .feat__num { color: var(--text-light); }

/* Tool card links */
.feat--link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.2s, transform 0.2s;
}
.feat--link:hover {
  background: var(--bg);
  transform: translateY(-2px);
}
.feat__cta {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}
.feat--link:hover .feat__cta { color: var(--accent-dark); }

/* 5-item grid: 3+2 layout on desktop, stacks on mobile */
.features__grid--5 {
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}

.contact__inner { max-width: 540px; }

.contact h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.contact__sub {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 28px;
}

.contact__email {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  padding: 12px 24px;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  display: inline-block;
  transition: background 0.15s, color 0.15s;
}
.contact__email:hover {
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   FOOTER — simple, split layout
   ============================================================ */
.footer {
  padding: 32px 0;
  background: var(--bg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__mark {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.footer__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.footer__right {
  text-align: right;
}

.footer__right p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

.footer__right a {
  color: var(--text-mid);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.footer__right a:hover { color: var(--accent); }

.footer__attribution {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.footer__attribution p {
  font-size: 10px;
  color: var(--text-light);
  line-height: 1.6;
}

.footer__attribution a {
  color: var(--text-mid);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.footer__attribution a:hover { color: var(--accent); }

.footer .footer__credit {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer .footer__credit p {
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
}

.footer__credit a {
  color: var(--text-mid);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.footer__credit a:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE — tablet
   ============================================================ */
@media (max-width: 840px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .hero { padding: 64px 0 56px; }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RESPONSIVE — mobile
   ============================================================ */
@media (max-width: 540px) {
  .hero { padding: 48px 0 40px; }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .features__heading { margin-bottom: 32px; }

  .feat { padding: 28px 24px; }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer__right { text-align: left; }
}

/* ============================================================
   LEGAL PAGES — Privacy Policy, Terms & Conditions
   ============================================================ */
.legal {
  padding: 96px 0;
}

.legal__title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal__updated {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 48px;
}

.legal__body {
  max-width: 720px;
}

.legal__body h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal__body h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal__body p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-mid);
  margin-bottom: 12px;
}

.legal__body ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 12px;
}

.legal__body li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-mid);
  margin-bottom: 4px;
}

.legal__body code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

.legal__body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-light);
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.legal__body a:hover { color: var(--accent-dark); }

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-dark);
  border-top: 1px solid #2a2a28;
  padding: 20px max(24px, env(safe-area-inset-right)) 20px max(24px, env(safe-area-inset-left));
}
.cookie-banner.is-hidden { display: none; }

.cookie-banner__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-banner__text {
  font-size: 14px;
  line-height: 1.6;
  color: #b0b0a8;
}

.cookie-banner__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-banner__btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.cookie-banner__btn--accept {
  background: var(--accent);
  color: #fff;
}
.cookie-banner__btn--accept:hover { background: var(--accent-dark); }

.cookie-banner__btn--decline {
  background: transparent;
  color: #b0b0a8;
  border: 1px solid #3a3a38;
}
.cookie-banner__btn--decline:hover {
  color: #e4e4e3;
  border-color: #5a5a58;
}

@media (max-width: 540px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .cookie-banner__actions {
    justify-content: center;
  }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .nav, .nav__burger { display: none; }
  .hero__terminal { display: none; }
  .cookie-banner { display: none; }
}
