/* FrogeeSoft design kit, v2: the language used on FG-Track (fgtrack.ru).
   Dark green-black ground, teal accent, Inter, heavy caps headlines, two corner radii,
   a header with a nav pill. Drop this file in and use the classes listed in README.md. */

:root {
  --bg: #090c0a;
  --bg-soft: #0d120f;
  --surface: #111713;
  --surface-2: #161d18;
  --text: #f1f5ef;
  --muted: #98a398;
  --line: rgba(240, 255, 238, .13);
  --line-strong: rgba(240, 255, 238, .28);
  --accent: #21aabe;
  --accent-soft: #62c7d4;
  --on-accent: #061316;
  --flag: #ff6e66;
  --radius: 22px;
  --radius-sm: 16px;
  --header-h: 82px;
  --container: min(1240px, calc(100vw - 48px));
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #eef2e9;
  --bg-soft: #e4eade;
  --surface: #f8faf4;
  --surface-2: #e8eee2;
  --text: #121713;
  --muted: #4f5a50;
  --line: rgba(18, 23, 19, .13);
  --line-strong: rgba(18, 23, 19, .26);
  --accent: #147889;
  --accent-soft: #147889;
  --on-accent: #ffffff;
  --flag: #e8482c;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px; line-height: 1.55; overflow-x: clip;
  transition: background .35s ease, color .35s ease;
}
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 20px; top: -60px; z-index: 999; padding: 12px 16px; background: var(--accent); color: var(--on-accent); border-radius: var(--radius-sm); font-weight: 800; transition: top .2s; }
.skip-link:focus { top: 16px; }
.wrap { width: var(--container); margin-inline: auto; }
.section { width: var(--container); margin-inline: auto; padding: 130px 0; }
.nb, .brand-text { white-space: nowrap; }

/* Headlines: the presentation's voice. Heavy caps, tight, accent in teal, white full stop. */
h1, h2 { font-weight: 900; text-transform: uppercase; letter-spacing: -.055em; line-height: .94; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.2vw, 4.3rem); }
h1 span, h2 em { color: var(--accent); font-style: normal; }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }

/* Header from the original site: wordmark on the left, a nav pill and round buttons on the right. */
.site-header { position: fixed; inset: 0 0 auto; z-index: 80; height: 96px; color: var(--text); transition: height .3s; }
/* Over the hero (dark in both themes) the header always uses light ink. */
body:not(.menu-open) .site-header:not(.is-scrolled) { --text: #f1f5ef; --muted: #c3cdcb; --line: rgba(240, 255, 238, .22); --bg: #090c0a; --surface: #161d18; }
.site-header.is-scrolled { height: 80px; }
.header-inner { width: var(--container); height: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); border: 1px solid transparent; border-radius: var(--radius); transition: padding .3s, background .3s, border-color .3s; }
.fg-brand-icon { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: cover; flex: none; transition: width .3s, height .3s, border-radius .3s; }
.site-header.is-scrolled .fg-brand-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); }
.brand-text { font-size: 1.9rem; font-weight: 800; letter-spacing: -.055em; line-height: 1; }
.fg-brand-separator { color: var(--accent); font-weight: 400; margin: 0 1px; }
.header-end { display: flex; align-items: center; gap: 10px; }
.site-nav { display: flex; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-nav a { padding: 10px 16px; border-radius: var(--radius-sm); color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .2s, background .2s; }
.site-nav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 9%, transparent); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .menu-toggle, .header-search-mobile { position: relative; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--text); cursor: pointer; transition: transform .2s, border-color .2s; }
.theme-toggle:hover, .menu-toggle:hover, .header-search-mobile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--text) 40%, transparent); }
.theme-toggle svg, .header-search-mobile svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }
.menu-toggle, .header-search-mobile { display: none; }
.menu-toggle span { position: absolute; left: 13px; width: 18px; height: 1.5px; background: currentColor; transition: transform .25s, top .25s; }
.menu-toggle span:first-child { top: 18px; }
.menu-toggle span:last-child { top: 26px; }
.menu-toggle[aria-expanded="true"] span { top: 22px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
body.menu-open { overflow: hidden; }
.fg-mobile-menu { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; padding: 120px 24px 40px; background: var(--bg); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.fg-mobile-menu.is-open { opacity: 1; visibility: visible; }
.fg-mobile-menu a { padding: 14px 0; font-size: 1.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: -.045em; color: var(--text); }
.fg-mobile-menu a:hover { color: var(--accent); }
.fg-mobile-menu .mobile-menu-contact { margin-top: auto; font-size: 1rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--accent); }
.header-search-dialog { width: min(560px, calc(100% - 32px)); margin-top: 14vh; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.header-search-dialog::backdrop { background: rgba(3, 8, 8, .65); }
.header-search-field { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.header-search-field svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.header-search-field input { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 1.05rem; }
.header-search-field input:focus { outline: none; }
.header-search-field button { padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; }
.header-search-results { display: grid; gap: 4px; padding: 12px; max-height: 50dvh; overflow: auto; }
.header-search-results a { padding: 14px; border-radius: var(--radius-sm); font-weight: 500; }
.header-search-results a:hover, .header-search-results a:focus-visible { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.header-search-results p { padding: 14px; color: var(--muted); }

/* Buttons */
.button { min-height: 54px; padding: 0 24px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-weight: 600; border: 1px solid var(--line); cursor: pointer; transition: transform .22s, background .22s, border-color .22s, color .22s; }
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.button-secondary { background: color-mix(in srgb, var(--surface) 65%, transparent); }
.button-secondary:hover { border-color: var(--line-strong); background: var(--surface); }

.section-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 90px); align-items: end; margin-bottom: 56px; }
.section-head > p { color: var(--muted); font-size: 1.1rem; max-width: 46ch; }

/* Statement cards (problem, app notes, plans): flat filled surfaces, teal titles */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.info-card { padding: 30px; border-radius: var(--radius); background: var(--surface); min-height: 200px; }
.info-card h3 { margin-bottom: 14px; color: var(--accent); }
.info-card p { color: var(--muted); }

/* FAQ */
.faq { background: var(--bg-soft); width: 100%; padding-inline: calc((100vw - var(--container)) / 2); }
.faq-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr); gap: clamp(28px, 6vw, 90px); align-items: start; }
.faq-grid h2 { margin-bottom: 20px; }
.faq-lead { color: var(--muted); }
.faq-items { display: grid; gap: 10px; }
details { border-radius: var(--radius); background: var(--surface); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; border-radius: var(--radius); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 11px; height: 11px; margin-top: -4px; border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(45deg); transition: transform .25s; }
details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
details p { padding: 0 24px 24px; color: var(--muted); max-width: 62ch; }

/* Contact: solid teal band, the same in both themes */
.contact { width: 100%; max-width: none; background: #21aabe; color: #061316; padding: 110px 0; overflow: hidden; }
.contact-card { width: var(--container); margin-inline: auto; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.mascot { width: clamp(150px, 22vw, 300px); transform: rotate(-6deg); }
.contact h2 { font-size: clamp(2rem, 5vw, 5rem); max-width: 11em; }
.contact h2 em { color: #f1f5ef; }
.contact-copy p { max-width: 50ch; margin: 22px 0 30px; font-size: 1.1rem; }
.contact .button-primary { background: #061316; color: #f1f5ef; border-color: #061316; }
.contact .button-primary:hover { background: #f1f5ef; color: #061316; border-color: #f1f5ef; }

/* Footer: the deck's cover wordmark, white FG-, teal TRACK, white full stop */
.footer { width: var(--container); margin-inline: auto; padding: 70px 0 30px; }
.footer-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer-name { font-size: clamp(2.6rem, 10vw, 9rem); line-height: .85; font-weight: 900; letter-spacing: -.065em; white-space: nowrap; }
.footer-name em { color: var(--accent); font-style: normal; }
.footer nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; color: var(--muted); font-weight: 650; font-size: .95rem; }
.footer nav a:hover { color: var(--text); }
.frogee img { width: 124px; height: auto; }
.frogee .on-dark { display: none; }
[data-theme="dark"] .frogee .on-dark { display: block; }
[data-theme="dark"] .frogee .on-light { display: none; }
.legal { margin-top: 28px; font-size: .85rem; color: var(--muted); }

/* Entrances */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Responsive: the header collapses to search, theme and menu buttons. */
@media (max-width: 1100px) {
  .site-nav { display: none; }
  .menu-toggle, .header-search-mobile { display: grid; }
}
@media (max-width: 820px) {
  :root { --container: calc(100% - 24px); --header-h: 68px; }
  .section { padding: 90px 0; }
  .site-header { height: 76px; }
  .site-header.is-scrolled { height: 68px; }
  .fg-brand-icon { width: 42px; height: 42px; }
  .site-header.is-scrolled .fg-brand-icon { width: 36px; height: 36px; }
  .brand-text { font-size: 1.5rem; }
  .header-actions { gap: 6px; }
  .theme-toggle, .menu-toggle, .header-search-mobile { width: 42px; height: 42px; }
  .menu-toggle span { left: 11px; }
  .menu-toggle span:first-child { top: 16px; }
  .menu-toggle span:last-child { top: 24px; }
  .menu-toggle[aria-expanded="true"] span { top: 20px; }
  .info-grid { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  h2 { font-size: clamp(1.7rem, 7.4vw, 2.3rem); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
