/* =========================================================
   Top Clip — Design C
   One typeface (Golos Text), one accent (Top Clip red),
   square images, 3px radius only on things you can click or type in.
   Values are provisional until a design system exists.
   ========================================================= */

:root {
  --ink: #18222E;
  --steel-600: #4F5965;   /* secondary text (7:1 on white) */
  --steel-300: #C9CFD6;   /* strong lines */
  --steel-200: #DFE3E8;   /* hairlines */
  --steel-50:  #F3F5F7;   /* panels */
  --white: #FFFFFF;
  --red: #C8282B;         /* only for actions and key data */
  --red-dark: #9E1F22;

  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale, ratio 1.25 */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-lg: 1.3125rem;
  --t-xl: 1.75rem;
  --t-2xl: 2.25rem;
  --t-hero: clamp(2.25rem, 4.6vw, 3.6rem);

  /* Spacing: tight inside groups, wide between them */
  --s-1: 4px; --s-2: 8px; --s-3: 16px; --s-4: 24px; --s-5: 40px; --s-6: 64px; --s-7: 104px;

  --radius: 3px;
  --page: 1180px;
  --margin: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: var(--t-base); line-height: 1.6; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 var(--s-3); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }
p { margin: 0 0 var(--s-3); max-width: 66ch; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { width: min(100% - 2 * var(--margin), var(--page)); margin-inline: auto; }
.section { padding-block: clamp(var(--s-6), 8vw, var(--s-7)); border-top: 1px solid var(--steel-200); }
.section--panel { background: var(--steel-50); }
.lead { font-size: var(--t-lg); color: var(--steel-600); }
.note { font-size: var(--t-sm); color: var(--steel-600); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: var(--s-3); z-index: 99; }
.skip:focus { left: var(--s-3); }

/* ---------- Buttons: rectangular, small radius ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s-4); border-radius: var(--radius); border: 2px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s; }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--white); }
.btn--line-light { border-color: var(--white); color: var(--white); }
.btn--line-light:hover { background: var(--white); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--steel-200); }
.top__in { display: flex; align-items: center; gap: var(--s-4); min-height: 72px; }
.top__logo img { height: 40px; width: auto; }
.top nav { display: flex; gap: var(--s-4); margin-left: auto; }
.top nav a { white-space: nowrap; text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.top nav a:hover { color: var(--red); }
.top__phone { font-size: var(--t-sm); font-weight: 700; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lang { display: flex; font-size: var(--t-xs); font-weight: 700; border: 1px solid var(--steel-300); border-radius: var(--radius); }
.lang a, .lang span { padding: 5px 9px; text-decoration: none; }
.lang span { background: var(--ink); color: var(--white); }
.top .btn { min-height: 40px; padding: 0 var(--s-3); font-size: var(--t-sm); }

.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 7px 14px; border: 1px solid var(--steel-300); border-radius: var(--radius); }
.menu summary::-webkit-details-marker { display: none; }
.menu__panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--steel-200); padding: var(--s-3) var(--margin) var(--s-4); display: grid; }
.menu__panel a { padding: 12px 0; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--steel-50); }

@media (max-width: 1120px) {
  .top nav, .top__phone, .top__cta { display: none; }
  .menu { display: block; }
  .top__in { gap: var(--s-3); }
}

/* ---------- Hero: words + dimensioned drawing ---------- */
.hero { padding-block: clamp(var(--s-5), 7vw, 88px); }
.hero__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(var(--s-5), 5vw, var(--s-6)); align-items: center; }
.hero h1 { font-size: var(--t-hero); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.hero .lead { max-width: 44ch; margin-bottom: var(--s-5); }
.hero__meta { margin: var(--s-4) 0 0; font-size: var(--t-sm); color: var(--steel-600); }
.hero__meta a { color: var(--ink); font-weight: 600; }

.drawing { margin: 0; }
.drawing svg { width: 100%; height: auto; }
.drawing figcaption { margin-top: var(--s-2); font-size: var(--t-xs); color: var(--steel-600); }

@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

/* ---------- Clipband: comparison table ---------- */
.clip__grid { display: grid; grid-template-columns: 1fr 340px; gap: var(--s-6); align-items: start; }
.clip__photo { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--steel-50); }
.clip__aside .note { margin-top: var(--s-2); }

.table-scroll { overflow-x: auto; margin: var(--s-4) 0 var(--s-3); border: 1px solid var(--steel-300); }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; font-variant-numeric: tabular-nums; background: var(--white); }
.compare th, .compare td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--steel-200); vertical-align: top; font-size: var(--t-sm); }
.compare thead th { background: var(--ink); color: var(--white); font-size: var(--t-base); }
.compare tbody th { font-weight: 500; color: var(--steel-600); position: sticky; left: 0; background: var(--white); }
.compare td { font-weight: 600; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare .shared td { font-weight: 500; }

.facts { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4) var(--s-5); }
.facts li { border-top: 2px solid var(--ink); padding-top: var(--s-2); font-size: var(--t-sm); color: var(--steel-600); }
.facts strong { display: block; font-size: var(--t-lg); color: var(--ink); }

.machines { margin-top: var(--s-5); }
.machines h3 { font-size: var(--t-base); }
.machines ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.machines li { padding: 6px 12px; border: 1px solid var(--steel-300); border-radius: var(--radius); font-size: var(--t-sm); font-weight: 600; background: var(--white); }

@media (max-width: 960px) { .clip__grid { grid-template-columns: 1fr; } .clip__aside { max-width: 420px; } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Other products: plain list, not a card kit ---------- */
.range { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
.range h3 { font-size: var(--t-base); color: var(--steel-600); font-weight: 600; padding-bottom: var(--s-2); border-bottom: 2px solid var(--ink); }
.range ul { list-style: none; margin: 0; padding: 0; }
.range li a { display: grid; grid-template-columns: 88px 1fr; gap: var(--s-3); align-items: center; padding: var(--s-3) 0; border-bottom: 1px solid var(--steel-200); text-decoration: none; }
.range img { width: 88px; height: 88px; object-fit: cover; background: var(--steel-50); }
.range strong { display: block; }
.range span { display: block; font-size: var(--t-sm); color: var(--steel-600); }
.range li a:hover strong { color: var(--red); text-decoration: underline; }
.tag { display: inline-block; margin-top: 4px; font-size: var(--t-xs); color: var(--steel-600); border: 1px solid var(--steel-300); padding: 0 6px; border-radius: var(--radius); }
@media (max-width: 860px) { .range { grid-template-columns: 1fr; gap: var(--s-5); } }

/* ---------- Quote request form ---------- */
.rfq { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--s-6); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3) var(--s-4); }
.field { display: grid; gap: 6px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: var(--t-sm); font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; font-size: var(--t-base); padding: 10px 12px; border: 1px solid var(--steel-300); border-radius: var(--radius); background: var(--white); color: var(--ink); width: 100%; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.form .actions { grid-column: 1 / -1; align-items: center; }
.form__status { grid-column: 1 / -1; margin: 0; font-size: var(--t-sm); }
@media (max-width: 900px) { .rfq { grid-template-columns: 1fr; gap: var(--s-5); } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- Company ---------- */
.company { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); align-items: start; }
.company img { width: 100%; }
.catalog { display: grid; grid-template-columns: 80px 1fr; gap: var(--s-3); align-items: center; margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--steel-300); }
.catalog p { margin: 0 0 var(--s-2); }
@media (max-width: 860px) { .company { grid-template-columns: 1fr; gap: var(--s-5); } }

/* ---------- Contact (one deliberate dark block) ---------- */
.contact { background: var(--ink); color: var(--white); border-top: 0; }
.contact .lead { color: #C3CAD2; }
.contact__phone { display: inline-block; margin: var(--s-3) 0 var(--s-2); font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-variant-numeric: tabular-nums; }
.contact__phone:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.contact__who { color: #C3CAD2; margin-bottom: var(--s-5); }
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); padding-top: var(--s-4); border-top: 1px solid rgba(255,255,255,.2); }
.people h3 { font-size: var(--t-sm); font-weight: 500; color: #C3CAD2; margin-bottom: var(--s-2); }
.people p { margin: 0 0 var(--s-1); font-weight: 700; }
.people a { display: block; padding: 2px 0; text-decoration: none; font-variant-numeric: tabular-nums; }
.people a:hover { text-decoration: underline; }
.people address { font-style: normal; }
.contact .actions { margin-top: var(--s-5); }
@media (max-width: 760px) { .people { grid-template-columns: 1fr; gap: var(--s-4); } }

/* ---------- Footer ---------- */
.foot { padding-block: var(--s-4); font-size: var(--t-sm); color: var(--steel-600); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-5); }
.foot p { margin: 0; }
.foot nav { display: flex; gap: var(--s-4); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* small helpers */
.compare caption { caption-side: bottom; text-align: left; padding: 8px 16px; font-size: var(--t-xs); color: var(--steel-600); }
.clip__colours { margin-top: var(--s-4); width: 100%; }
.range { margin-top: var(--s-5); }
/* let grid columns shrink so wide tables scroll inside their box instead of widening the page */
.hero__grid > *, .clip__grid > *, .rfq > *, .company > *, .range > * { min-width: 0; }
.form__fallback { grid-column: 1 / -1; }
.form__fallback[hidden] { display: none; }
.catalog__alt { margin-top: var(--s-2); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* [more information] markers: details the owner still has to provide */
.info { background: #FFE58A; color: var(--ink); padding: 0 4px; border-radius: 2px; font-weight: 600; font-size: 0.9em; white-space: nowrap; }
.docs { margin: var(--s-4) 0; display: grid; gap: var(--s-2); }
.docs div { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); padding-bottom: var(--s-2); border-bottom: 1px solid var(--steel-200); font-size: var(--t-sm); }
.docs dt { color: var(--steel-600); }
.docs dd { margin: 0; }
/* keep the logo from being squeezed by long (Bulgarian) menu labels */
.top__logo { flex: none; }
.top__logo img { max-width: none; }
/* Bulgarian menu labels are longer, so switch to the compact menu earlier */
@media (max-width: 1260px) {
  html[lang="bg"] .top nav, html[lang="bg"] .top__phone, html[lang="bg"] .top__cta { display: none; }
  html[lang="bg"] .menu { display: block; }
}
