:root {
  --blue: #0e3d8f;
  --blue-dark: #082a63;
  --blue-deep: #061f4a;
  --accent: #1458cc;
  --bg: #ffffff;
  --bg-alt: #f3f6fb;
  --text: #1f2733;
  --muted: #5a6577;
  --border: #d9e0ec;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
a { color: var(--accent); }

/* Header */
.site-header {
  background: var(--blue);
  color: #fff;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 20px; flex-wrap: wrap;
}
.brand { color: #fff; font-weight: 700; font-size: 1.25rem; text-decoration: none; letter-spacing: .02em; }
.main-nav { display: flex; gap: 14px; flex-wrap: wrap; }
.main-nav a { color: #dbe6f8; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.main-nav a:hover { background: rgba(255,255,255,.12); }
.main-nav a.active { background: rgba(255,255,255,.2); color: #fff; }

/* Language dropdown (top right) */
.lang-select-wrap { margin-left: auto; position: relative; display: inline-block; }
.lang-select-wrap::after {
  content: "▾";
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: #fff; font-size: .8rem;
}
.lang-select {
  appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.45); border-radius: 999px;
  padding: 5px 28px 5px 14px; font: inherit; font-size: .9rem;
  cursor: pointer; max-width: 180px;
}
.lang-select:hover { background: rgba(255,255,255,.2); }
.lang-select option { color: #1f2733; background: #fff; }

/* Hero — Apple-style: full-bleed background image slot + text that scrolls in */
.hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex; align-items: center;
  color: #fff; text-align: center;
  padding: 96px 0;
  background:
    linear-gradient(180deg, rgba(6,31,74,.72) 0%, rgba(8,42,99,.55) 45%, rgba(6,31,74,.82) 100%),
    var(--hero-bg-image, linear-gradient(135deg, var(--blue-deep), var(--blue) 55%, var(--accent)));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .hero { background-attachment: fixed; }
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(1.9rem, 5.2vw, 3.1rem);
  font-weight: 700; line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: .01em;
}
.hero-lead { max-width: 680px; margin: 0 auto 28px; font-size: clamp(1rem, 2vw, 1.2rem); opacity: .95; }

/* Scroll-in reveal (triggered by JS adding .is-loaded on <html>) */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform .9s cubic-bezier(.22,.61,.36,1);
}
html.is-loaded [data-reveal] { opacity: 1; transform: none; }
html.is-loaded [data-reveal="2"] { transition-delay: .18s; }
html.is-loaded [data-reveal="3"] { transition-delay: .36s; }
html.is-loaded [data-reveal="4"] { transition-delay: .54s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero { background-attachment: scroll; }
}
.no-js [data-reveal] { opacity: 1; transform: none; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 8px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  font-size: 1rem; font-family: inherit;
}
.btn-primary { background: #fff; color: var(--blue-deep); }
.btn-primary:hover { background: #e8f0fc; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
main .btn-ghost, .product-info .btn-ghost { color: var(--blue); border-color: var(--blue); }
.btn-sm { padding: 6px 12px; font-size: .9rem; }
.hero .btn + .btn { margin-left: 10px; }

/* Sections */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: 1.8rem; margin: 0 0 30px; color: var(--blue); }
.page-title { font-size: 2rem; margin: 0 0 18px; color: var(--blue); }
.lead { color: var(--muted); font-size: 1.05rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; gap: 8px;
}
a.card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(14,61,143,.1); }
.card-icon { font-size: 1.8rem; }
.card h3 { margin: 4px 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card-img { border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; background: var(--bg-alt); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img.placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .9rem; text-align: center; padding: 10px; }
.card-img.placeholder.big { aspect-ratio: 16/9; font-size: 1.1rem; }
.cat-tag { display: inline-block; font-size: .78rem; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 10px; align-self: flex-start; }

/* Filter chips */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip {
  text-decoration: none; color: var(--text); background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; font-size: .92rem;
}
.chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.empty { color: var(--muted); padding: 30px 0; }

/* Product detail */
.crumb { display: inline-block; margin-bottom: 10px; font-size: .9rem; }
.product-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 34px; margin-top: 10px; }
@media (max-width: 860px) { .product-grid { grid-template-columns: 1fr; } }
#main-image { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; }
.thumbs img.active { border-color: var(--accent); }
.price { font-size: 1.4rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 10px; }
.desc { white-space: pre-line; margin-bottom: 18px; }
.product-video { margin-top: 26px; }
.video-frame { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--radius); overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.downloads { margin: 18px 0; }
.downloads ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.downloads li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-meta { color: var(--muted); font-size: .9rem; }

/* Contact */
.contact-email { margin: 18px 0 26px; font-size: 1.1rem; }
.contact-email a { font-weight: 600; }
.contact-form { display: grid; gap: 16px; margin-top: 10px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.contact-form input, .contact-form textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.flash { padding: 12px 16px; border-radius: 8px; margin: 14px 0; }
.flash-ok { background: #e5f4ea; color: #1c6b3a; border: 1px solid #bfe3cc; }
.flash-err { background: #fdecec; color: #a33; border: 1px solid #f3c2c2; }

/* Footer */
.site-footer { background: var(--blue-deep); color: #b9c8e4; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; padding: 34px 20px; flex-wrap: wrap; }
.footer-name { font-weight: 700; font-size: 1.15rem; color: #fff; }
.footer-tagline { margin: 6px 0; }
.footer-contact { margin: 0; }
.footer-copy { align-self: center; font-size: .88rem; }

/* ===== Responsive: tablet & phone ===== */
@media (max-width: 900px) {
  .section { padding: 44px 0; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}

@media (max-width: 760px) {
  .header-inner { padding: 10px 14px; gap: 8px 14px; }
  .brand { font-size: 1.1rem; }
  .main-nav { order: 3; width: 100%; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
  .main-nav a { padding: 5px 9px; font-size: .95rem; white-space: nowrap; }
  .lang-select-wrap { margin-left: auto; }
  .hero { padding: 72px 0; min-height: 0; }
  .hero .btn { display: block; margin: 10px auto; max-width: 320px; }
  .hero .btn + .btn { margin-left: 0; }
  .footer-inner { flex-direction: column; padding: 26px 16px; }
  .footer-copy { align-self: flex-start; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 14px; }
  .cards { grid-template-columns: 1fr; }
  .section-title, .page-title { font-size: 1.5rem; }
  .lang-select { max-width: 150px; font-size: .85rem; }
}
