:root {
  --bg: #0a0b0c;
  --bg-raised: #16181a;
  --surface: #1d2023;
  --line: #34393d;
  --line-soft: #24282b;
  --white: #f4f2ee;
  --text-soft: #a6acaf;
  --text-faint: #6d7477;
  --accent: #e07a2c;
  --accent-dim: #8a4d1e;
  --steel: #7c8a93;

  --font-display: "Big Shoulders Display", "Oswald", "Arial Narrow", sans-serif;
  --font-display-condensed: "Sofia Sans Extra Condensed", "Big Shoulders Display", "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 26px 56px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav[data-border]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  border-bottom: 1px solid var(--line);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: 1px;
  color: var(--white);
  text-decoration: none;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__links a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
}

.lang-switch button {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  background: none;
  border: none;
  padding: 7px 10px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.lang-switch button:hover { color: var(--white); }

.lang-switch button.is-active { color: var(--bg); background: var(--accent); }

/* Admin logout (in the nav, next to the language switcher) */
.nav__logout { margin: 0; }

.nav__logout-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-soft);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav__logout-btn:hover { color: var(--accent); }

/* Mobile nav burger */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.nav__burger::-moz-focus-inner { border: 0; padding: 0; }

.nav__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Shared content wrapper */
.content {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  line-height: 0.98em;
  color: var(--white);
  max-width: 860px;
  margin: 0;
}

.section-title--light { color: var(--white); }

.section-intro {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6em;
  color: var(--text-soft);
  max-width: 560px;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 18px 30px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover { background: #f28f43; transform: translateY(-2px); }

.btn--outline {
  color: var(--white);
  background: transparent;
  border: 2px solid var(--line);
}

.btn--outline:hover { border-color: var(--accent); color: var(--accent); background: transparent; transform: translateY(-2px); }

.btn--danger {
  color: var(--white);
  background: transparent;
  border: 2px solid var(--line);
  margin-left: auto;
}

.btn--danger:hover { border-color: #c0392b; color: #c0392b; background: transparent; transform: translateY(-2px); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-raised);
  min-height: 720px;
  width: 100%;
  padding: 88px 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 30px;
}

.hero__bg { position: absolute; inset: 0; }

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.45) contrast(1.15) brightness(0.75);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0a0b0cf2 0%, #0a0b0c66 38%, #0a0b0cb3 100%);
}

.hero__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display-condensed);
  font-weight: 900;
  font-size: 96px;
  letter-spacing: -1.5px;
  text-transform: uppercase;
  line-height: 1.0em;
  color: var(--white);
  max-width: 900px;
  margin: 0;
}

.hero__desc {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5em;
  color: var(--text-soft);
  max-width: 540px;
  margin: 0;
}

.hero__cta {
  position: relative;
  z-index: 1;
}

/* About */
.about {
  background: var(--bg);
  width: 100%;
  padding: 100px 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.pillars {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 2px;
  background: var(--line);
  border: 2px solid var(--line);
}

.pillar {
  background: var(--bg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pillar__num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--accent);
  margin: 0;
}

.pillar__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  color: var(--white);
  margin: 0;
}

.pillar__desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.55em;
  color: var(--text-soft);
  margin: 0;
}

/* Industries */
.industries {
  background: var(--bg-raised);
  width: 100%;
  padding: 100px 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.industry-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(49px, 1fr));
  gap: 2px;
  background: var(--line);
  border: 2px solid var(--line);
}

.industry {
  background: var(--bg-raised);
  min-height: 240px;
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.2s ease;
}

.industry:hover { background: var(--surface); }

.industry__num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--accent);
  margin: 0;
}

.industry__body { display: flex; flex-direction: column; gap: 10px; }

.industry__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  text-transform: uppercase;
  line-height: 1em;
  color: var(--white);
  margin: 0;
}

.industry__desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5em;
  color: var(--text-soft);
  margin: 0;
}

/* Products */
.products {
  background: var(--bg);
  width: 100%;
  padding: 100px 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.products__desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55em;
  color: var(--text-soft);
  max-width: 620px;
  margin: 0;
}

.products__add { align-self: flex-start; }

.product-grid {
  width: 100%;
  min-height: 820px;
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 2px;
  background: var(--line);
  border: 2px solid var(--line);
}

.product-card {
  position: relative;
  background: var(--bg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.product-card__handle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 16px;
  line-height: 1;
  color: var(--text-soft);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  cursor: grab;
}

.product-card__handle:hover { color: var(--accent); border-color: var(--accent); }

.sortable-ghost { opacity: 0.4; }

.product-card:hover { background: var(--surface); cursor: pointer; }

.product-card__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-raised);
  margin-bottom: 6px;
  overflow: hidden;
}

.product-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) contrast(1.08);
}

.product-card__title {
  font-family: var(--font-display-condensed);
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
}

.product-card--skeleton { cursor: default; }

.product-card--skeleton .product-card__thumb,
.product-card__skeleton-line { animation: skeleton-pulse 1.4s ease-in-out infinite; }

.product-card__skeleton-line { background: var(--bg-raised); border-radius: 2px; }
.product-card__skeleton-line--badge { width: 70px; height: 11px; }
.product-card__skeleton-line--title { width: 80%; height: 20px; }

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Product detail */
.product-detail {
  background: var(--bg);
  width: 100%;
  padding: 100px 56px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.product-detail__back {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.4px;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-detail__back:hover { color: var(--accent); }

.product-detail__layout {
  width: 100%;
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
}

/* Server-rendered product pages have no fetch-then-reveal step (the data is
   already in the initial HTML), so they render ready via this modifier
   instead of the JS-driven reveal the loading-skeleton pattern below uses. */
.product-detail__layout.is-ready { display: grid; }

.product-detail__loading {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
}

.product-detail__loading-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-raised);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.product-detail__loading-info { display: flex; flex-direction: column; gap: 18px; }

.product-detail__loading-line { background: var(--bg-raised); border-radius: 2px; animation: skeleton-pulse 1.4s ease-in-out infinite; }
.product-detail__loading-line--badge { width: 90px; height: 12px; }
.product-detail__loading-line--title { width: 70%; height: 34px; }
.product-detail__loading-line--note { width: 100%; height: 14px; }
.product-detail__loading-line--note-short { width: 55%; height: 14px; }

.product-detail__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-raised);
  overflow: hidden;
}

.product-detail__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.25) contrast(1.08); }

.product-detail__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.product-detail__note {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55em;
  color: var(--text-soft);
  max-width: 520px;
  margin: 0;
}

.product-detail__description {
  display: none;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55em;
  color: var(--white);
  max-width: 520px;
  margin: 0;
  white-space: pre-line;
}

.product-detail__description.is-ready { display: block; }

.product-detail__notfound { display: none; }

.product-detail__notfound.is-ready { display: block; }

.product-detail__edit { align-self: flex-start; margin-top: 8px; }

/* Product edit form (in-place edit, and later "add product") */
.product-edit-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.product-edit-form__error {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 8px;
}

.product-edit-form__label {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 10px;
}

.product-edit-form__input,
.product-edit-form__textarea,
.product-edit-form__file {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--white);
  background: var(--bg-raised);
  border: 2px solid var(--line);
  padding: 10px 12px;
}

.product-edit-form__textarea { min-height: 80px; resize: vertical; }

.product-edit-form__input:focus,
.product-edit-form__textarea:focus { outline: none; border-color: var(--accent); }

.product-edit-form__actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

/* Contact */
.contact {
  position: relative;
  overflow: hidden;
  background: var(--bg-raised);
  width: 100%;
  padding: 110px 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}

.contact__bg { position: absolute; inset: 0; }

.contact__bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.5) contrast(1.15) brightness(0.6); }

.contact__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #0a0b0cf5 0%, #0a0b0cc2 50%, #0a0b0c66 100%);
}

.contact .eyebrow,
.contact .section-title,
.contact__desc,
.contact .btn { position: relative; z-index: 1; }

.contact__desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5em;
  color: var(--text-soft);
  max-width: 600px;
  margin: 0;
}

/* Contacts page */
.contacts {
  background: var(--bg);
  width: 100%;
  padding: 100px 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.contacts__desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55em;
  color: var(--text-soft);
  max-width: 620px;
  margin: 0;
}

/* 404 */
.notfound {
  background: var(--bg);
  width: 100%;
  padding: 140px 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.notfound__desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55em;
  color: var(--text-soft);
  max-width: 520px;
  margin: 0;
}

.contacts-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 2px;
  background: var(--line);
  border: 2px solid var(--line);
}

.contact-item {
  background: var(--bg);
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  transition: background 0.2s ease;
}

a.contact-item:hover { background: var(--surface); cursor: pointer; }

.contact-item__label {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.contact-item__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
}

/* Admin login */
.admin-login {
  background: var(--bg);
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 100px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.admin-login__error {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--accent);
  margin: 0;
}

.admin-login__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.admin-login__label {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-soft);
}

.admin-login__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--white);
  background: var(--bg-raised);
  border: 2px solid var(--line);
  padding: 14px 16px;
}

.admin-login__input:focus { outline: none; border-color: var(--accent); }

/* Footer */
.footer {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 44px 56px;
  background: var(--bg-raised);
}

.footer[data-border]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  border-top: 1px solid var(--line);
}

.footer__brand {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4em;
  color: var(--text-soft);
  margin: 0;
  flex: 1 0 0;
}

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

.footer__contact {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.footer__copy {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  margin: 0;
  white-space: nowrap;
}

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1199.98px) {
  .nav { padding: 18px 24px; }
  .nav__burger { display: flex; }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 24px;
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }

  .nav__links.is-open { display: flex; }

  .nav__links a { width: 100%; padding: 10px 0; font-size: 16px; }

  .hero { min-height: 560px; padding: 48px 24px; gap: 22px; }
  .hero__title { font-size: 52px; letter-spacing: -0.8px; line-height: 0.94em; max-width: 100%; }
  .hero__desc { max-width: 100%; }

  .about, .industries, .products, .product-detail, .contacts, .notfound { padding: 56px 24px; gap: 28px; }

  .contact { padding: 56px 24px; gap: 20px; }

  .section-title { font-size: 40px; max-width: 100%; }

  .pillars, .industry-grid, .product-grid, .contacts-grid { grid-template-columns: 1fr; }

  .product-detail__layout, .product-detail__loading { grid-template-columns: 1fr; gap: 28px; }

  .footer { flex-direction: column; align-items: flex-start; padding: 28px 24px; gap: 14px; }
  .footer__brand { width: 100%; }
  .footer__contacts { flex-wrap: wrap; gap: 12px 20px; }
}

@media (max-width: 480px) {
  .hero__title { font-size: 38px; }
  .section-title { font-size: 30px; }
}
