/* ============================================================
   RIJEKA TRANS — Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* Color */
  --bg:        #f4f2ed;
  --bg-deep:   #ece9e1;
  --surface:   #ffffff;
  --ink:       #15202a;
  --ink-soft:  #46535d;
  --ink-faint: #7a838b;

  --navy:      #0a2a43;
  --navy-700:  #0e3a5c;
  --navy-900:  #061a2b;

  --accent:        #ee3a2f;
  --accent-strong: #c5221a;
  --accent-soft:   #fbe0de;

  --line:      #ddd8cd;
  --line-soft: #e8e4da;

  /* Type */
  --sans: 'Archivo', system-ui, -apple-system, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;

  /* Spacing rhythm */
  --pad: clamp(20px, 5vw, 88px);
  --maxw: 1240px;

  --r: 4px;
  --r-lg: 10px;

  --shadow: 0 1px 2px rgba(6,26,43,.04), 0 12px 32px -16px rgba(6,26,43,.22);
  --shadow-lg: 0 2px 4px rgba(6,26,43,.05), 0 28px 60px -28px rgba(6,26,43,.32);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.02; letter-spacing: -0.02em; font-weight: 800; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: clamp(56px, 9vw, 132px); }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 15px 26px;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-700); transform: translateY(-1px); }
.btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn--outline { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--outline:hover { border-color: var(--navy); color: var(--navy); }

/* ============================================================
   HEADER
   ============================================================ */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,242,237,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  transition: background .25s ease, border-color .25s ease;
}
.site-head.scrolled { box-shadow: 0 1px 0 var(--line), 0 6px 20px -12px rgba(6,26,43,.3); }
.head-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 48px; height: 48px;
  background: var(--navy);
  border-radius: 8px;
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
  flex: none;
  padding: 7px;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-mark--txt::before { content: "RT"; color: #fff; font-weight: 900; font-size: 17px; letter-spacing: -0.04em; }
.site-head .brand-mark {
  background: #fff;
  border-radius: 9px;
  padding: 3px;
  width: 52px;
  height: 52px;
  box-shadow: 0 1px 3px rgba(6,26,43,.12);
}
.site-head .brand-mark::after { display: none; }
.site-head .brand-mark img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.site-head .brand-mark--txt { width: 44px; height: 44px; background: var(--navy); border-radius: 8px; }
.site-head .brand-mark--txt::after { display: block; }
.brand-mark::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 5px;
  background: var(--accent);
}
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.brand-name span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-faint); text-transform: uppercase; margin-top: 3px; }
.is-dark .brand-name b { color: #fff; }
.site-head .brand-name b { font-size: 23px; letter-spacing: -0.025em; }
.is-dark .brand-name span { color: rgba(255,255,255,.65); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  font-weight: 600;
  font-size: 15px;
  padding: 9px 14px;
  border-radius: var(--r);
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--navy); background: rgba(10,42,67,.05); }
.nav a.active { color: var(--navy); }
.is-dark .nav a { color: rgba(255,255,255,.78); }
.is-dark .nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.is-dark .nav a.active { color: #fff; }

.head-cta { display: flex; align-items: center; gap: 14px; }
.head-phone {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  color: var(--navy); white-space: nowrap;
}
.is-dark .head-phone { color: #fff; }
.head-phone svg { width: 16px; height: 16px; color: var(--accent); }

.burger { display: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot { background: var(--navy-900); color: rgba(255,255,255,.72); }
.foot-top {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(48px, 7vw, 84px) var(--pad) 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
}
.foot-brand .brand-mark { background: #fff; border-radius: 8px; padding: 6px; width: 46px; height: 46px; }
.foot-brand .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.foot-brand .brand-mark::after { display: none; }
.foot-brand .brand-name b { color: #fff; }
.foot-brand p { margin-top: 18px; font-size: 14.5px; line-height: 1.7; max-width: 32ch; color: rgba(255,255,255,.6); }
.foot-social { display: flex; gap: 12px; margin-top: 22px; }
.foot-social a {
  width: 40px; height: 40px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.85);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.foot-social a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.foot-social svg { width: 19px; height: 19px; }
.foot-col h4 { font-size: 12px; font-family: var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; font-weight: 700; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.foot-col a, .foot-col li { font-size: 14.5px; color: rgba(255,255,255,.72); transition: color .15s ease; }
.foot-col a:hover { color: #fff; }
.foot-col .mono { font-family: var(--mono); font-size: 13px; }
.foot-eu {
  max-width: var(--maxw); margin: 0 auto;
  padding: 22px var(--pad) 0;
}
.foot-eu-img {
  background: #fff;
  border-radius: 6px;
  padding: 10px 18px;
  height: 75px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.foot-bottom {
  border-top: none;
  max-width: var(--maxw); margin: 0 auto;
  padding: 8px var(--pad) 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  flex-wrap: wrap;
  font-size: 13px; color: rgba(255,255,255,.5);
}
.foot-bottom .mono { font-family: var(--mono); }
.foot-bottom a { color: rgba(255,255,255,.7); text-decoration: underline; text-underline-offset: 3px; transition: color .15s ease; }
.foot-bottom a:hover { color: var(--accent); }

/* ---------- Legal / privacy page ---------- */
.legal { max-width: 760px; }
.legal-intro { font-size: 18px; color: var(--ink); font-weight: 600; }
.legal p { font-size: 16.5px; color: var(--ink-soft); margin-bottom: 18px; line-height: 1.75; }
.legal h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 40px 0 14px; }
.legal-list { margin: 0 0 18px; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.legal-list li { position: relative; padding-left: 26px; font-size: 16.5px; color: var(--ink-soft); }
.legal-list li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.legal-contact { margin-top: 48px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 32px; }
.legal-contact h3 { font-size: 20px; margin-bottom: 10px; }
.legal-contact p { margin-bottom: 12px; }
.legal-contact a { color: var(--accent-strong); font-weight: 600; }

/* ---------- Shared section header ---------- */
.sec-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-title { font-size: clamp(28px, 4.2vw, 50px); }
.sec-lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-soft); max-width: 46ch; align-self: end; text-wrap: pretty; }
@media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; } }

/* ---------- Tick list ---------- */
.ticks { list-style: none; display: grid; gap: 13px; margin: 26px 0 0; }
.ticks li { position: relative; padding-left: 32px; font-size: 16px; color: var(--ink-soft); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c06d1c' stroke-width='3'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- Reveal on scroll (subtle) ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Image fallback (subtle striped placeholder) ---------- */
.imgfill { position: relative; background:
  repeating-linear-gradient(135deg, #dfe6ec 0 12px, #e7edf2 12px 24px); overflow: hidden; }
.imgfill img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .nav, .head-phone { display: none; }
  .head-cta .btn--primary { display: none; }
  .burger {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; border: 1px solid var(--line);
    background: var(--surface); border-radius: var(--r); cursor: pointer;
  }
  .is-dark .burger { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color:#fff; }
  .burger svg { width: 22px; height: 22px; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .foot-top { grid-template-columns: 1fr; }
}

/* ---------- Mobile drawer ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 100;
  background: var(--navy-900);
  display: flex; flex-direction: column;
  padding: 26px var(--pad);
  transform: translateX(100%);
  transition: transform .3s ease;
  visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer .brand-name b { color:#fff; }
.drawer-close { width:44px;height:44px;display:grid;place-items:center;background:rgba(255,255,255,.1);border:none;border-radius:var(--r);color:#fff;cursor:pointer; }
.drawer nav { display: flex; flex-direction: column; gap: 4px; margin-top: 40px; }
.drawer nav a { color: #fff; font-size: 26px; font-weight: 800; letter-spacing:-.02em; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.drawer .btn { margin-top: 28px; justify-content: center; }
