/* ==========================================================
   Citytavlan – Parkeringsskivor med eget tryck
   ========================================================== */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/barlow-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Saira Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/saira-condensed-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Saira Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/saira-condensed-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Saira Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/saira-condensed-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Saira Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/saira-condensed-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Färger */
  --green-900: #082a1f;
  --green-800: #0d3b2c;
  --green-700: #124a37;
  --green-600: #1a5c45;
  --green-500: #23704f;
  --accent: #d0cd46;
  --accent-hover: #dcd96f;
  --text: #f2f7f3;
  --text-muted: #d3e3d9;
  --line: rgba(255, 255, 255, 0.12);

  /* Typografi */
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Saira Condensed", "Arial Narrow", var(--font);

  /* Mått */
  --container: 900px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-md: 8px;
  --section-space: clamp(56px, 9vw, 112px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; 
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.2rem; 
  line-height: 1.75;
  color: var(--text);
  background-color: var(--green-800);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(208, 205, 70, 0.07), transparent 60%),
    linear-gradient(180deg, var(--green-800) 0%, var(--green-700) 55%, var(--green-800) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header .container,
.site-footer .container { max-width: none; }

.container--full { max-width: none; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--green-900);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
  background-color: rgba(13, 59, 44, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { display: inline-flex; }
.logo svg { width: 160px }

.header-cta {
  font-weight: 600;
  text-decoration: none;
  color: var(--green-900);
  font-family: "Saira Condensed";
  padding: 8px 16px;
  line-height: 1.3;
  background-color: var(--accent);
  border-radius: 4px;
  white-space: nowrap;
  transition: background-color 0.2s, transform 0.2s;
}
.header-cta:hover { 
    background: var(--accent-hover); transform: translateY(-2px);
 }

/* ---------- Intro ---------- */

.intro { padding-block: var(--section-space) calc(var(--section-space) * 0.7); }

.intro__content {
  container-type: inline-size;
}

h1,
h2 {
  font-family: var(--font-display);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2.75rem, 1.25rem + 6.5vw, 6rem); /* reserv för äldre webbläsare */
  /* "Parkeringsskivor" fyller hela kolumnens bredd (ordet är ca 5,96em brett) */
  font-size: clamp(2rem, 16.5cqi, 9rem);
  line-height: 0.95;
  text-wrap: wrap;
}

.intro__heading { margin: 0; }

.introstart__subtitle {
  font-size: clamp(1.25rem, 1rem + 0.5vw, 1.5rem); /* reserv för äldre webbläsare */
  /* Samma princip som .intro__subtitle men ca 60 % av storleken */
  font-size: clamp(1.375rem, 3.1cqi, 2.4375rem); /* samma minsta storlek som .intro__subtitle */
  line-height: 1.2;
  color: var(--accent);
  margin-bottom: 1.5em;
}
.intro__subtitle {
  margin: 1em 0 0;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.875rem); /* reserv för äldre webbläsare */
  /* Underrubriken skalar med kolumnens bredd (ca 80 % av bredden, texten är ca 15,2em bred) */
  font-size: clamp(1.375rem, 5.2cqi, 4rem);
  line-height: 1.2;
  color: var(--accent);
}

.intro__text {
  margin: clamp(20px, 3vw, 36px) 0 0;
}

.intro__text p {
  margin: 0 0 1.4em;
  color: var(--text-muted);
}
.intro__text p:last-child { margin-bottom: 0; }

.intro__text .lead {
  font-size: 1.35rem; 
  line-height: 1.65;
  font-weight: 400;
  color: var(--text);
}

/* ---------- Läs mer (accordion) ---------- */

.read-more { margin-top: 1.4em; }

.read-more__toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  border-radius: 999px;
}

.read-more__icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transition: transform 0.3s ease, background-color 0.2s, color 0.2s;
}
.read-more__icon::before,
.read-more__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: currentColor;
}
.read-more__icon::after { transform: rotate(90deg); }

.read-more__toggle:hover { color: var(--accent-hover); }
.read-more__toggle:hover .read-more__icon { background: var(--accent); color: var(--green-900); }

.read-more__toggle[aria-expanded="true"] .read-more__icon { transform: rotate(45deg); }

.js .read-more__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.4s ease, visibility 0s linear 0.4s;
}
.js .read-more__toggle[aria-expanded="true"] + .read-more__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.4s ease, visibility 0s;
}
.read-more__content { overflow: hidden; }
.read-more__content > :first-child { margin-top: 1.2em; }

html:not(.js) .read-more__toggle { display: none; }

/* ---------- Galleri / slider ---------- */

.gallery { padding-bottom: var(--section-space); }

.slider {
  --per-page: 4;
  --gap: 1.5rem;
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.slider.is-dragging { cursor: grabbing; }
.slider:focus-visible { outline-offset: -3px; border-radius: 0; }

.slider__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--gap);
  will-change: transform;
}

.slide {
  flex: 0 0 calc((100% + var(--gap)) / var(--per-page) - var(--gap));
}

.slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 1190 / 1855;
  object-fit: cover;
  border-radius: var(--radius-md);
  pointer-events: none;
  -webkit-user-drag: none;
}

.slider__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 20px;
}

.slider__toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: none;
  color: var(--accent);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.slider__toggle:hover { background: var(--accent); color: var(--green-900); }
.slider__toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.slider__toggle .icon-play { display: none; fill: currentColor; stroke: none; width: 18px; height: 18px; }
.slider__toggle[aria-pressed="true"] .icon-play { display: block; }
.slider__toggle[aria-pressed="true"] .icon-pause { display: none; }

/* ---------- Kontakt ---------- */

.contact { padding-bottom: calc(var(--section-space) * 1.5); }

.contact__card {
  border: 1px solid var(--line);
  padding: clamp(24px, 6vw, 64px);
  border-radius: 8px;
}

.contact h2 {
  font-size: clamp(3rem, 2rem + 4vw, 5rem);
  line-height: 1.05;
}

.contact__lead {
  font-size: 1.35rem;
    line-height: 1.65;
    font-weight: 400;
    color: var(--text);
}

.contact__hours {
  margin: 10px 0 0;
  color: var(--text-muted);
}

.contact__list {
  list-style: none;
  padding: 0;
  margin: 50px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 60px;
  font-weight: 500;
}

.contact__label {
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 6px;
  display: block;
}

.contact__list a {
  text-decoration: none;
  display: block;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.25s ease, color 0.2s;
  font-size: 2.1rem;
  line-height: 1.3;
}
.contact__list a:hover { color: var(--accent); background-size: 100% 2px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 28px;
}
.site-footer p { margin: 0; }

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 48px;
}

.footer__right { text-align: right; }

.footer__address {
  font-style: normal;
  line-height: 1.7;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover { color: var(--accent); }

.site-footer .footer__copy {
  opacity: 0.7;
}

@media (max-width: 1024px) {
  .footer__inner { flex-direction: column; align-items: flex-start;}
  .footer__right { order: -1; text-align: left; }
}

/* ---------- Responsivt ---------- */

@media (max-width: 1024px) {
  .slider { --per-page: 3; }
}

@media (max-width: 767px) {
  .slider { --per-page: 1.5; --gap: 1rem; }
}

@media (max-width: 600px) {
  .contact__list { flex-direction: column; }
}
