:root {
  color-scheme: dark;
  --bg: #090a0b;
  --surface: #111416;
  --surface-2: #171b1e;
  --line: #32383d;
  --text: #f7f4ee;
  --muted: #aab1b4;
  --accent: #f1a52f;
  --accent-dark: #a84c2f;
  --cool: #8fc8d5;
  --ok: #9ee2b4;
  --error: #ff9d8f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 24px; font-size: clamp(64px, 11vw, 144px); line-height: .84; letter-spacing: 0; }
h2 { font-size: clamp(34px, 5vw, 66px); line-height: 1; letter-spacing: 0; }
h3 { margin-bottom: 10px; font-size: 21px; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  min-height: 76px; padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: rgba(8,10,11,.9); backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; background: var(--accent); color: #171009; font-weight: 950; }
.brand strong, .brand small { display: block; }
.brand small, .eyebrow { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 850; }
nav { display: flex; justify-content: center; gap: 24px; }
nav a { color: var(--muted); text-decoration: none; font-weight: 750; }
nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; justify-self: end; gap: 10px; min-width: 0; }
.language-switch { display: grid; grid-template-columns: repeat(2, 38px); height: 40px; border: 1px solid var(--line); }
.lang-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 900; }
.lang-button.is-active { background: var(--text); color: #111; }
.nav-login, .button {
  min-height: 44px; padding: 0 18px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-weight: 850;
}
.button.primary { border-color: var(--accent); background: var(--accent); color: #171009; }
.button.ghost { background: rgba(9,10,11,.45); }
.button.small { min-height: 34px; padding: 0 12px; }
.button:hover, .nav-login:hover { filter: brightness(1.08); }

.hero { position: relative; min-height: 86svh; display: grid; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-image { position: absolute; inset: 0; background: #090a0b url("/assets/sun-helios-hero.png") right center / auto 110% no-repeat; }
.hero-shade { position: absolute; inset: 0 auto 0 0; width: min(64%, 920px); background: rgba(7,8,9,.7); }
.hero-copy { position: relative; z-index: 2; width: 100%; max-width: 820px; min-width: 0; padding: clamp(64px, 9vw, 112px) clamp(20px, 5vw, 72px); }
.lede { max-width: 660px; color: #e0e1dd; font-size: clamp(19px, 2.2vw, 28px); text-shadow: 0 2px 14px #000; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-status { position: absolute; z-index: 2; right: clamp(18px, 4vw, 56px); bottom: 30px; display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(9,10,11,.72); color: #e9efed; font-size: 13px; font-weight: 750; backdrop-filter: blur(12px); }
.status-light { width: 8px; height: 8px; background: var(--ok); box-shadow: 0 0 18px var(--ok); border-radius: 50%; }

.metric-band { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); background: #0e1113; }
.metric-band div { padding: 26px clamp(18px, 4vw, 54px); border-right: 1px solid var(--line); }
.metric-band strong { display: block; font-size: 30px; }
.metric-band span { color: var(--muted); }
.section { padding: clamp(68px, 9vw, 132px) clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.introduction, .catalog-section, .admin-section, .contact-section { display: grid; grid-template-columns: minmax(0,.9fr) minmax(340px,1.1fr); gap: clamp(30px,6vw,84px); align-items: start; }
.section p { max-width: 760px; color: var(--muted); }
.cards, .tech-grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(3, 1fr); }
.card, .tech-grid article, .request-form, .admin-card { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; box-shadow: 0 18px 48px rgba(0,0,0,.2); }
.card { padding: 23px; }
.card.featured { border-color: rgba(241,165,47,.7); }
.card-code, .tech-index { display: inline-block; margin-bottom: 18px; color: var(--accent); font-weight: 900; }

.mode-band { display: grid; grid-template-columns: minmax(300px,.7fr) minmax(0,1.3fr); gap: 50px; padding: clamp(58px,8vw,100px) clamp(20px,5vw,72px); border-bottom: 1px solid var(--line); background: #15171a; }
.mode-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mode-list span { padding: 17px 18px; background: #101315; color: #d9dcda; font-weight: 760; }
.tech-section { background: #0c0f11; }
.section-heading { margin-bottom: 36px; }
.tech-grid { grid-template-columns: repeat(4,1fr); }
.tech-grid article { padding: 25px; }

.request-form { display: grid; gap: 14px; padding: 22px; }
label { display: grid; gap: 7px; color: #dde0de; font-weight: 760; }
input, textarea, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #343a3e; border-radius: 0; background: #080a0b; color: var(--text); }
textarea { resize: vertical; }
.form-status { min-height: 22px; margin: 0; }
.form-status[data-tone="ok"] { color: var(--ok); }
.form-status[data-tone="error"] { color: var(--error); }
.logged-in { display: none; }
body[data-authenticated="true"] .logged-in { display: block; }
body[data-authenticated="true"] .logged-out { display: none; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 580px; border-collapse: collapse; }
th, td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; color: var(--muted); }
th { color: var(--text); }
address { display: grid; gap: 8px; color: var(--muted); font-style: normal; }
address a { color: var(--text); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer strong { color: var(--text); font-size: 15px; }

dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(6px); }
.login-panel { position: relative; display: grid; gap: 14px; padding: 28px; }
.dialog-close { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.model-dialog .dialog-close { z-index: 4; background: rgba(9,10,11,.82); }

.model-card { position: relative; min-height: 220px; cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.model-card:hover, .model-card:focus-visible { transform: translateY(-4px); border-color: var(--accent); background: #171a1c; outline: none; }
.card-link { position: absolute; left: 23px; right: 23px; bottom: 20px; display: flex; justify-content: space-between; color: var(--accent); font-size: 13px; font-weight: 900; }
.card-link::after { content: "+"; font-size: 18px; line-height: 1; }

.model-dialog { width: min(980px, calc(100% - 28px)); max-height: calc(100svh - 28px); overflow: auto; }
.model-panel { position: relative; display: grid; grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr); min-height: 620px; }
.model-visual { position: relative; min-height: 100%; overflow: hidden; border-right: 1px solid var(--line); background: radial-gradient(circle at 50% 38%, rgba(241,165,47,.24), transparent 36%), #0b0d0e; }
.model-content { padding: clamp(34px, 5vw, 62px); }
.model-content h2 { margin-bottom: 16px; font-size: clamp(38px, 5vw, 64px); }
.model-summary { color: var(--muted); font-size: 18px; }
.model-price { display: grid; gap: 5px; margin: 28px 0; padding: 18px 0; border-block: 1px solid var(--line); }
.model-price span, .model-price small { color: var(--muted); }
.model-price strong { color: var(--accent); font-size: 30px; }
.model-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0 0 28px; background: var(--line); border: 1px solid var(--line); }
.model-specs div { min-width: 0; padding: 13px 14px; background: #0d1011; }
.model-specs dt { color: var(--muted); font-size: 12px; }
.model-specs dd { margin: 4px 0 0; color: var(--text); font-weight: 850; overflow-wrap: anywhere; }
.visual-core, .visual-ring, .visual-base { position: absolute; display: block; }
body[data-product="sun"] .visual-core { left: 50%; top: 42%; width: 180px; height: 180px; transform: translate(-50%,-50%); border: 18px solid #c9c5bb; border-radius: 50%; background: radial-gradient(circle, #fff2bd 0 12%, #f1a52f 42%, #6d2e20 68%, #151719 70%); box-shadow: 0 0 70px rgba(241,165,47,.32); }
body[data-product="sun"] .visual-ring { left: 50%; top: 42%; width: 250px; height: 250px; transform: translate(-50%,-50%); border: 1px solid rgba(241,165,47,.55); border-radius: 50%; box-shadow: inset 0 0 0 24px rgba(255,255,255,.025), inset 0 0 0 25px rgba(241,165,47,.22); }
body[data-product="sun"] .visual-base { left: 50%; bottom: 92px; width: 230px; height: 58px; transform: translateX(-50%); border: 1px solid #69635c; border-radius: 50%; background: linear-gradient(#4b4b49, #17191a); box-shadow: 0 22px 36px #000; }
.reveal-ready .reveal-item { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal-ready .reveal-item.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero-shade { width: 100%; background: rgba(7,8,9,.58); }
  .metric-band, .cards, .tech-grid, .introduction, .catalog-section, .admin-section, .contact-section, .mode-band { grid-template-columns: 1fr; }
  .metric-band div { border-right: 0; border-bottom: 1px solid var(--line); }
  .model-panel { grid-template-columns: 1fr; }
  .model-visual { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 650px) {
  body { overflow-x: hidden; }
  h1 { max-width: 100%; font-size: 50px; line-height: .92; overflow-wrap: anywhere; }
  .hero { min-height: 80svh; }
  .hero-image { background-position: 62% center; background-size: cover; }
  .hero-status { display: none; }
  .site-header { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-inline: 14px; }
  .brand small, .nav-login { display: none; }
  .header-actions { gap: 0; }
  .hero-copy { max-width: 100%; padding-inline: 24px; }
  .lede { max-width: 100%; font-size: 18px; overflow-wrap: anywhere; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .mode-list { grid-template-columns: 1fr; }
  .model-dialog { width: calc(100% - 16px); max-height: calc(100svh - 16px); }
  .model-content { padding: 28px 20px; }
  .model-content h2 { font-size: 40px; }
  .model-specs { grid-template-columns: 1fr; }
  .model-visual { min-height: 230px; }
  body[data-product="sun"] .visual-core { width: 124px; height: 124px; border-width: 12px; }
  body[data-product="sun"] .visual-ring { width: 174px; height: 174px; }
  body[data-product="sun"] .visual-base { bottom: 28px; width: 170px; }
}
