/* ============================================================
   RFID in Rail · hemsida — styles
   Samma DNA som manualen + lite mer luft för marknadssidan.
   ============================================================ */

:root {
  --c-bg: #F6F7F9;
  --c-paper: #FFFFFF;
  --c-rule: #E2E5EA;
  --c-ink: #111418;
  --c-ink-mute: #4F5663;
  --c-ink-faint: #8B95A3;

  --c-steel: #2B323C;
  --c-steel-2: #3A414D;

  --c-accent: #FF6A00;          /* orange från app-ikonen */
  --c-accent-deep: #CC4F00;
  --c-go: #19B27A;              /* mint från app */
  --c-go-soft: #DCF3E9;
  --c-warn: #E0A800;

  --ff-display: "Space Grotesk", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

html, body {
  font-family: var(--ff-body);
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* =============== Container =============== */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) { .container { padding: 0 20px; } }

/* =============== Top nav =============== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 247, 249, 0.85);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--c-rule);
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  text-decoration: none;
}
.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--c-steel);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.topnav-links {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}
.topnav-links a {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-ink-mute);
  text-decoration: none;
  transition: color 120ms;
}
.topnav-links a:hover { color: var(--c-ink); }
.topnav-links a.cta {
  background: var(--c-ink);
  color: white;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 700;
}
.topnav-links a.cta:hover { background: var(--c-accent); color: white; }
@media (max-width: 560px) {
  .topnav-links a:not(.cta) { display: none; }
}

/* =============== Hero =============== */
.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero { padding: 50px 0 30px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 24px;
}
.hero-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--c-accent);
}
.hero h1 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 60px;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
  text-wrap: balance;
}
@media (max-width: 880px) { .hero h1 { font-size: 44px; } }
@media (max-width: 480px) { .hero h1 { font-size: 36px; } }

.hero-lede {
  font-size: 18px;
  color: var(--c-ink-mute);
  max-width: 540px;
  margin-bottom: 32px;
  text-wrap: pretty;
}

.hero-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  padding: 13px 22px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--c-ink);
  background: var(--c-paper);
  color: var(--c-ink);
  cursor: pointer;
  transition: background 140ms, color 140ms, border-color 140ms, transform 140ms;
}
.btn:hover { background: var(--c-ink); color: white; }
.btn.primary {
  background: var(--c-ink);
  color: white;
}
.btn.primary:hover { background: var(--c-accent); border-color: var(--c-accent); }
.btn .arrow { transition: transform 200ms; }
.btn:hover .arrow { transform: translateX(3px); }

.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--c-ink-faint);
  text-transform: uppercase;
  padding-top: 24px;
  border-top: 1px solid var(--c-rule);
  max-width: 540px;
}
.hero-meta div strong {
  display: block;
  color: var(--c-ink);
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.005em;
  text-transform: none;
  margin-bottom: 2px;
}

/* Hero illustration - phone with screen + decorative bg */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 580px;
}
.hero-visual .phone-frame {
  width: 280px;
  border-radius: 36px;
  padding: 11px;
  background: #1A1E25;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 40px 80px -28px rgba(17,20,24,0.5),
    0 16px 32px -16px rgba(17,20,24,0.35);
  position: relative;
  z-index: 2;
  transform: rotate(-3deg);
  transition: transform 600ms cubic-bezier(.2,.7,.3,1);
}
.hero-visual .phone-frame:hover { transform: rotate(0deg) scale(1.02); }
.hero-visual .phone-screen {
  width: 100%;
  border-radius: 26px;
  overflow: hidden;
  display: block;
  background: white;
}
.hero-visual .phone-frame img { width: 100%; height: auto; }

/* Floating accent badges around phone */
.hero-badge {
  position: absolute;
  background: var(--c-paper);
  border: 1px solid var(--c-rule);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px -12px rgba(17,20,24,0.15);
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  z-index: 3;
}
.hero-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-go);
}
.hero-badge .label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
  margin-bottom: 2px;
}
.hero-badge .value {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--c-ink);
}
.hero-badge.tl { top: 30px; left: -20px; }
.hero-badge.br { bottom: 50px; right: -20px; }
.hero-badge.ml { top: 50%; right: -40px; transform: translateY(-50%); }

@media (max-width: 880px) {
  .hero-badge.tl, .hero-badge.br, .hero-badge.ml { display: none; }
  .hero-visual { min-height: 420px; }
  .hero-visual .phone-frame { width: 230px; }
}

/* Decorative background — subtle radial waves behind phone */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg circle {
  fill: none;
  stroke: var(--c-accent);
  opacity: 0.06;
}

/* =============== Section =============== */
.section {
  padding: 88px 0;
  position: relative;
}
.section.dark {
  background: var(--c-steel);
  color: white;
}
.section.dark .section-kicker { color: var(--c-accent); }
.section.dark .section-title { color: white; }
.section.dark .section-lede { color: rgba(255,255,255,0.75); }

@media (max-width: 720px) { .section { padding: 60px 0; } }

.section-head {
  margin-bottom: 48px;
  max-width: 720px;
}
.section-kicker {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-wrap: balance;
}
@media (max-width: 720px) { .section-title { font-size: 30px; } }
.section-lede {
  font-size: 17px;
  color: var(--c-ink-mute);
  text-wrap: pretty;
}

/* =============== What does the app do? =============== */
.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 880px) { .what-grid { grid-template-columns: 1fr; gap: 36px; } }

.what-text h3 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 22px;
  margin: 22px 0 8px;
  letter-spacing: -0.01em;
}
.what-text p { color: var(--c-ink-mute); margin-bottom: 8px; }

/* Tag-format cards */
.tag-formats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tag-card {
  background: var(--c-paper);
  border: 1px solid var(--c-rule);
  border-radius: 14px;
  padding: 18px;
  transition: border-color 140ms, transform 140ms;
}
.tag-card:hover { border-color: var(--c-accent); transform: translateY(-2px); }
.tag-card-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 6px;
}
.tag-card-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.tag-card-sub {
  font-size: 13px;
  color: var(--c-ink-mute);
  margin-bottom: 10px;
}
.tag-card-epc {
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--c-ink);
  background: var(--c-bg);
  border: 1px solid var(--c-rule);
  border-radius: 6px;
  padding: 6px 8px;
  word-break: break-all;
}

/* =============== Reader brands =============== */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 880px) { .brands-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .brands-grid { grid-template-columns: 1fr; } }

.brand-card {
  background: white;
  border-radius: 16px;
  padding: 0;
  transition: transform 200ms, box-shadow 200ms;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -20px rgba(0,0,0,0.4);
}
.brand-card:hover .brand-arrow {
  color: var(--c-accent);
  transform: translate(2px, -2px);
}
.brand-arrow {
  display: inline-block;
  color: var(--c-ink-faint);
  font-weight: 600;
  margin-left: 4px;
  transition: color 200ms, transform 200ms;
}

.brand-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: white;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 16px;
}

.brand-name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  padding: 18px 20px 20px;
  text-align: center;
  border-top: 1px solid var(--c-rule);
}

/* =============== Workflow =============== */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: flow-step;
}
@media (max-width: 880px) { .flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .flow { grid-template-columns: 1fr; } }

.flow-step {
  counter-increment: flow-step;
  background: var(--c-paper);
  border: 1px solid var(--c-rule);
  border-radius: 14px;
  padding: 22px 20px;
  position: relative;
}
.flow-step::before {
  content: counter(flow-step, decimal-leading-zero);
  display: block;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.flow-step h4 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.flow-step p {
  font-size: 13.5px;
  color: var(--c-ink-mute);
}
.flow-step-glyph {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--c-bg);
  border: 1px solid var(--c-rule);
  display: grid;
  place-items: center;
  color: var(--c-accent);
  margin-bottom: 16px;
}

/* =============== Themes block (light+dark side by side) =============== */
.themes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}
@media (max-width: 880px) { .themes { grid-template-columns: 1fr; gap: 24px; } }

.theme-phone {
  width: 100%;
  max-width: 280px;
  border-radius: 36px;
  padding: 11px;
  background: #1A1E25;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 24px 60px -28px rgba(17,20,24,0.45);
  margin: 0 auto;
}
.theme-phone .screen {
  width: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: white;
}
.theme-phone img { width: 100%; height: auto; display: block; }

.themes-caption {
  text-align: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
  margin-top: 14px;
}

/* =============== CTA block =============== */
.cta-block {
  background: var(--c-steel);
  color: white;
  border-radius: 22px;
  padding: 60px 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 30px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) {
  .cta-block { grid-template-columns: 1fr; padding: 40px 28px; }
}
.cta-block::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: var(--c-accent);
  opacity: 0.08;
  filter: blur(20px);
}
.cta-block h2 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  position: relative;
  text-wrap: balance;
}
.cta-block p {
  color: rgba(255,255,255,0.78);
  font-size: 16px;
  margin-bottom: 24px;
  position: relative;
}
.cta-block .actions {
  position: relative;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cta-block .btn {
  background: white;
  color: var(--c-ink);
  border-color: white;
}
.cta-block .btn:hover { background: var(--c-accent); color: white; border-color: var(--c-accent); }
.cta-block .btn.ghost {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.3);
}
.cta-block .btn.ghost:hover { background: white; color: var(--c-ink); border-color: white; }
.cta-side {
  display: flex;
  justify-content: center;
  position: relative;
}

/* =============== Footer =============== */
.footer {
  padding: 40px 0 30px;
  border-top: 1px solid var(--c-rule);
  background: var(--c-paper);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--c-ink-faint);
  text-transform: uppercase;
}
.footer-inner a {
  color: var(--c-ink-faint);
  text-decoration: none;
}
.footer-inner a:hover { color: var(--c-accent); }
.footer-links {
  display: inline-flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* =============== Subtle sleeper pattern divider =============== */
.sleeper-divider {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 28px 0;
}
.sleeper-divider span {
  width: 4px;
  height: 20px;
  background: var(--c-rule);
  border-radius: 1px;
}
.sleeper-divider span:nth-child(4) { background: var(--c-accent); }

/* =============== Section background pattern (subtle) =============== */
.section.has-pattern { position: relative; }
.section.has-pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,106,0,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(25,178,122,0.04) 0%, transparent 50%);
  pointer-events: none;
}
.section.has-pattern > * { position: relative; }
