/* ============================================================
   FRIDHEM MÅLERI & BYGGSERVICE AB
   style.css — Desktop layout
   (Mobile/responsive styles to be added later)
   ============================================================ */


/* ── RESET ──────────────────────────────────────────────────
   Removes default browser margin/padding from every element
   and makes padding/border included in width calculations.   */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* Smooth scrolling when clicking anchor links */
}


/* ── CSS VARIABLES ───────────────────────────────────────────
   All colours live here so you only need to change them once.
   ─────────────────────────────────────────────────────────── */
:root {
  /* Brand reds/oranges */
  --rust:        #C1622F;   /* Primary brand colour */
  --rust-deep:   #9A4A20;   /* Darker hover state */
  --rust-light:  #D97F4E;   /* Lighter accent */

  /* Warm neutrals */
  --sand:        #F2EBE0;   /* Light warm background */
  --sand-mid:    #E8DDD0;   /* Slightly darker sand */
  --sand-dark:   #C8BAA8;   /* Muted tan */
  --cream:       #FAF7F2;   /* Near-white page background */

  /* Dark tones */
  --stone:       #3A3028;   /* Main text colour */
  --stone-mid:   #6B5F52;   /* Secondary text */
  --stone-light: #9A8E82;   /* Subtle/muted text */
  --forest:      #263228;   /* Contact section background */

  /* Accent */
  --amber:       #C49A3C;   /* Gold used in reviews stars + gallery eyebrow */

  /* Borders */
  --line:        #DDD4C6;   /* Divider lines */
}


/* ── BASE BODY ───────────────────────────────────────────────
   Default text, font and background for the whole page.       */
body {
  background: var(--cream);
  color: var(--stone);
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  overflow-x: hidden; /* Prevents horizontal scroll from ticker animation */
  line-height: 1.6;
}


/* ── CUSTOM SCROLLBAR (Chrome/Safari only) ───────────────────
   Thin rust-coloured scrollbar on the right edge of the page. */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--sand); }
::-webkit-scrollbar-thumb { background: var(--rust); border-radius: 3px; }


/* ── NAVIGATION ──────────────────────────────────────────────
   Fixed bar at the top of the page.
   Always has a solid sand background + bottom border.         */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000; /* Sits above all other content */
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6% 0 1%;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
}

.nav-hamburger { display: none; }

/* .solid is added by JS on scroll — adds a subtle blur effect
   on top of the existing background for extra depth.
   (Currently looks similar to the default state since the nav
   already has a solid colour.) */
nav.solid {
  background: rgba(242, 235, 224, 0.97);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

/* Logo image inside the nav link */
.nav-logo img {
  width: 250px;
  height: auto;
  flex-shrink: 0;
  margin-top: 20px;  /* adjust this value */
}


/* Nav link list */
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stone-mid);
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--rust); }

/* "Kontakta oss" button in the nav */
.nav-cta {
  background: var(--rust);
  color: #fff !important;       /* !important overrides the link colour above */
  padding: .55rem 1.4rem;
  border-radius: 3px;
  transition: background .2s !important;
}
.nav-cta:hover { background: var(--rust-deep) !important; }


/* ── HERO ────────────────────────────────────────────────────
   Full-screen section with hero.jpg as background.
   Content is centred in the middle of the screen.             */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 68px 6% 0; /* 68px top = nav height so content isn't hidden */
  position: relative;
  overflow: hidden;
  background: url("pictures/hero2.jpg") center/cover no-repeat;
}

/* Thin gradient colour bar across the very top of the hero */
#hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--rust), var(--amber), var(--rust-light));
}

#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}



/* Inner wrapper that constrains the hero content width */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
}


/* Big heading: "Hantverk med PRECISION & stolthet" */
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(3.5rem, 7.5vw, 7rem); /* Fluid: scales between 3.5rem–7rem */
  font-weight: 800;
  line-height: .93;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin-bottom: 1.8rem;
}

/* "& stolthet" uses transparent text with a coloured stroke */
.hero-title .outline {
  display: block;
  -webkit-text-stroke: 2.5px var(--stone);
  color: transparent;
}

/* Short description text below the title */
.hero-desc {
  font-size: 1.5rem;   /* Note: an earlier clamp() value was overridden by this — cleaned up */
  line-height: 1.85;
  max-width: 580px;
  margin: 0 auto 2.8rem;
  font-weight: 600;
}



/* Four stats in a row with a top border separator */
.hero-stats {
  display: flex;
  gap: 4rem;
  justify-content: center;
  margin-top: 4.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.stat-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 400;
}

/* ── HERO TEXT OVERRIDE ──────────────────────────────────────
   All hero text is forced white so it's readable over the
   background photo. This also overrides the .hero-desc font
   family so it uses Barlow (body font) not Barlow Condensed.  */
#hero .hero-title,
#hero .hero-desc,
#hero .stat-number,
#hero .stat-label,
#hero .badge-text,
#hero .hero-badge {
  color: #FFFFFF !important;
}

/* The outline text must stay transparent but with a white stroke */
#hero .hero-title .outline {
  -webkit-text-stroke: 2px #FFFFFF;
  color: transparent !important;
}


/* ── SCROLLING TICKER ────────────────────────────────────────
   A rust-coloured bar that scrolls service names infinitely.
   The track is exactly 2× its content width so the loop
   can restart seamlessly when translateX reaches -50%.         */
.ticker {
  background: var(--rust);
  padding: .85rem 0;
  overflow: hidden;
  border-top: 1px solid var(--rust-deep);
  border-bottom: 1px solid var(--rust-deep);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 32s linear infinite;
}

/* Hovering pauses the scroll */
.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
  padding: 0 2.5rem;
  white-space: nowrap;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.88);
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Small diamond separator after each item */
.ticker-item::after {
  content: '◆';
  color: rgba(255,255,255,.28);
  font-size: .5rem;
}

/* Moves the track left by half its total width (= one full copy of the content) */
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ── SHARED SECTION STYLES ───────────────────────────────────
   .section adds default padding used on Tjänster and Recensioner. */
.section { padding: 7rem 6%; }

/* Small label above section headings (e.g. "Vad vi gör") */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Short horizontal line before each eyebrow label */
.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--rust);
}

/* Large section heading shared across all sections */
.sec-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.2rem, 3.5vw, 3.4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.05;
  color: var(--stone);
}
.sec-title .acc { color: var(--rust); }                              /* Rust-coloured accent word */
.sec-title .out { -webkit-text-stroke: 2px var(--stone); color: transparent; } /* Outline style */


/* ── TJÄNSTER (Services) ─────────────────────────────────────
   Cream background section.
   Top part: 2-column header (title left, description right).
   Bottom part: 3×2 grid of service cards.                     */
#tjanster { background: var(--cream); }

/* Two-column section header */
.svc-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 3.5rem;
}

.svc-desc {
  font-size: .95rem;
  line-height: 1.9;
  color: var(--stone-light);
}

/* 3-column grid with shared outer border and rounded corners */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

/* Individual service card */
.svc-card {
  padding: 2.4rem 2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  position: relative;
  cursor: default;
  transition: background .25s;
}
.svc-card:hover { background: var(--sand); }

/* Animated rust underline that slides in on hover */
.svc-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.svc-card:hover::after { transform: scaleX(1); }



/* Card number label (01, 02 …) */
.svc-num {
  font-size: .6rem;
  color: var(--rust);
  letter-spacing: .2em;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

/* Card title */
.svc-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--stone);
  margin-bottom: .65rem;
}

/* Card body text */
.svc-text {
  font-size: .86rem;
  line-height: 1.8;
  color: var(--stone-light);
}


/* ── VARFÖR FRIDHEM (Why Us) ─────────────────────────────────
   Rust gradient background.
   2-column layout: heading on the left, benefit cards on the right. */
#varfor {
  background: linear-gradient(140deg, var(--rust) 0%, var(--rust-deep) 100%);
  padding: 6rem 6%;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 6rem;
  align-items: center;
}

/* Small uppercase label above the heading */
.why-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  font-weight: 500;
  margin-bottom: 1rem;
}
.why-eyebrow::before {
  content: '';
  width: 24px; height: 2px;
  background: rgba(255,255,255,.35);
}

/* Left column: white heading + outlined word */
.why-left .sec-title { color: #fff; }
.why-left .sec-title .out {
  -webkit-text-stroke: 2px rgba(255,255,255,.45);
  color: transparent;
}
.why-left p {
  color: rgba(255,255,255,.65);
  font-size: .95rem;
  line-height: 1.85;
  margin-top: 1.4rem;
}

/* Right column: vertical stack of benefit cards */
.why-items { display: flex; flex-direction: column; gap: 1.1rem; }

.why-item {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.13);
  padding: 1.3rem 1.5rem;
  border-radius: 6px;
  transition: background .2s;
}
.why-item:hover { background: rgba(255,255,255,.15); }



.why-item-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
  margin-bottom: .25rem;
}

.why-item-body {
  font-size: .83rem;
  color: rgba(255,255,255,.58);
  line-height: 1.7;
}


/* ── BILDER / GALLERI (Gallery) ──────────────────────────────
   Dark stone background.
   12-column grid where image 1 is tall (2 rows).               */
#bilder {
  background: var(--stone);
  padding: 7rem 6%;
}

/* Override eyebrow and title colours for dark background */
#bilder .eyebrow         { color: var(--amber); }
#bilder .eyebrow::before { background: var(--amber); }
#bilder .sec-title       { color: var(--cream); }
#bilder .sec-title .acc  { color: var(--rust-light); }



/* 12-column × 2-row mosaic grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 240px 240px;
  gap: 6px;
  border-radius: 8px;
  overflow: hidden;
}

/* Each grid cell */
.g-item {
  background: var(--stone-mid); /* Fallback colour while image loads */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Column span for each image in the mosaic layout */
.g-item:nth-child(1) { grid-column: span 5; grid-row: span 2; } /* Large left tile */
.g-item:nth-child(2) { grid-column: span 4; }
.g-item:nth-child(3) { grid-column: span 3; }
.g-item:nth-child(4) { grid-column: span 3; }
.g-item:nth-child(5) { grid-column: span 4; }

/* Images fill their cell fully */
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.g-item:hover img { transform: scale(1.04); } /* Subtle zoom on hover */



/* Rust tint overlay that fades in on hover */
.g-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(193,98,47,.45), rgba(154,74,32,.25));
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.g-item:hover::after { opacity: 1; }


/* ── RECENSIONER (Reviews) ───────────────────────────────────
   Sand background.
   Cards laid out in rows of 3 (.r3) or 2 (.r2).               */
#recensioner { background: var(--sand); }

/* Outer wrapper with gap between rows */
.reviews-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: 3.5rem; }

/* Row containers */
.reviews-row    { display: grid; gap: 6px; }
.reviews-row.r3 { grid-template-columns: repeat(3, 1fr); }
.reviews-row.r2 { grid-template-columns: repeat(2, 1fr); }

/* Individual review card */
.rev-card {
  background: var(--cream);
  padding: 2.2rem 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: box-shadow .25s, transform .25s;
}
.rev-card:hover {
  box-shadow: 0 10px 36px rgba(0,0,0,.09);
  transform: translateY(-3px);
}

/* Star row */
.rev-stars { color: var(--amber); font-size: .85rem; letter-spacing: 2px; margin-bottom: 1.1rem; }

/* Quote text — curly quotes added automatically via CSS */
.rev-text {
  font-size: .91rem;
  line-height: 1.78;
  color: var(--stone-mid);
  margin-bottom: 1.5rem;
  font-style: italic;
  font-weight: 300;
}
.rev-text::before { content: '\201C'; } /* Opening " */
.rev-text::after  { content: '\201D'; } /* Closing " */

/* Author row: avatar + name/company */
.rev-author { display: flex; align-items: center; gap: 12px; }

.rev-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--rust);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.rev-name { font-size: .84rem; font-weight: 500; color: var(--stone); }
.rev-co   { font-size: .7rem; color: var(--stone-light); margin-top: 2px; }


/* ── KONTAKT (Contact) ───────────────────────────────────────
   Dark forest background.
   2-column layout: contact info left, form right.              */
#kontakt { background: var(--forest); padding: 7rem 6%; }

.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 7rem;
  align-items: start;
}

/* Left column: override eyebrow + title to amber/cream on dark bg */
.k-left .eyebrow          { color: var(--amber); }
.k-left .eyebrow::before  { background: var(--amber); }
.k-left .sec-title        { color: var(--cream); }
.k-left .sec-title .acc   { color: var(--rust-light); }

/* Intro paragraph under the heading */
.k-desc {
  font-size: .92rem;
  line-height: 1.9;
  color: rgba(255,255,255,.48);
  margin: 1.3rem 0 2.5rem;
}

/* Vertical list of phone / email / address rows */
.k-info-list { display: flex; flex-direction: column; gap: 1rem; }

.k-info-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.05rem 1.3rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 6px;
}


.k-info-label {
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  margin-bottom: 2px;
}

.k-info-val { font-size: .9rem; color: var(--cream); font-weight: 300; }
.k-info-val a { color: var(--cream); text-decoration: none; transition: color .2s; }
.k-info-val a:hover { color: var(--rust-light); }

/* Company registration info box at the bottom of the left column */
.k-badge {
  margin-top: 2rem;
  padding: 1.1rem 1.3rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 6px;
  font-size: .76rem;
  line-height: 1.85;
  color: rgba(255,255,255,.28);
}
.k-badge strong {
  color: rgba(255,255,255,.42);
  font-weight: 400;
  display: block;
  margin-bottom: 4px;
}


/* ── CONTACT FORM ────────────────────────────────────────────
   Frosted-glass card on the right side of the contact section. */
.form-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  padding: 2.8rem;
}

.form-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--cream);
  margin-bottom: .3rem;
}

.form-card .form-subtitle {
  font-size: .8rem;
  color: rgba(255,255,255,.32);
  margin-bottom: 2.2rem;
  line-height: 1.6;
}

/* Two-column row for paired fields (first/last name, email/phone) */
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Individual field wrapper */
.f-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}

/* Field label */
.f-label {
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  font-weight: 400;
}

/* Input and textarea shared style */
.f-input {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 4px;
  padding: .78rem 1rem;
  font-size: .88rem;
  color: var(--cream);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  outline: none;
  width: 100%;
  transition: border-color .2s, background .2s;
}
.f-input::placeholder { color: rgba(255,255,255,.17); }
.f-input:focus {
  border-color: rgba(193, 98, 47, .65);
  background: rgba(255,255,255,.09);
}


/* Textarea specific */
textarea.f-input { resize: vertical; min-height: 115px; }



/* Full-width submit button */
.btn-send {
  width: 100%;
  background: var(--rust);
  color: #fff;
  border: none;
  padding: 1.05rem;
  cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  border-radius: 5px;
  transition: background .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: .2rem;
}
.btn-send:hover    { background: var(--rust-deep); transform: translateY(-1px); }
.btn-send:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Tiny privacy note under the button */
.f-privacy {
  font-size: .63rem;
  color: rgba(255,255,255,.18);
  text-align: center;
  margin-top: .9rem;
  line-height: 1.6;
}

/* Error banner (shown by JS if send fails or validation is wrong) */
.form-error {
  display: none; /* Hidden by default; JS sets display:block on error */
  background: rgba(180, 40, 40, .14);
  border: 1px solid rgba(180, 40, 40, .3);
  border-radius: 4px;
  padding: .85rem 1.1rem;
  font-size: .8rem;
  color: #ffaaaa;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

/* Success message (shown by JS after successful send, replaces the form) */
.form-success {
  display: none; /* Hidden by default; JS sets display:block on success */
  text-align: center;
  padding: 3.5rem 1rem;
}
.success-circle {
  width: 64px; height: 64px;
  background: rgba(193, 98, 47, .2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.7rem;
}
.form-success h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--cream);
  margin-bottom: .5rem;
}
.form-success p { font-size: .86rem; color: rgba(255,255,255,.38); line-height: 1.7; }

/* Loading spinner shown inside the button while EmailJS is sending */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ── FOOTER ──────────────────────────────────────────────────
   Very dark bar at the bottom.
   Flex row: brand name left, copyright centre, nav links right. */
footer {
  background: #1A2218;
  padding: 2.5rem 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 3px solid var(--rust);
}

.f-brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--cream);
}
.f-brand small {
  display: block;
  font-size: .54rem;
  font-weight: 400;
  letter-spacing: .22em;
  color: rgba(255,255,255,.2);
  font-family: 'Barlow', sans-serif;
  margin-top: 4px;
}

.f-copy { font-size: .67rem; color: rgba(255,255,255,.2); letter-spacing: .08em; }

.f-nav { display: flex; gap: 2rem; list-style: none; }
.f-nav a {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: rgba(255,255,255,.27);
  text-decoration: none;
  transition: color .2s;
}
.f-nav a:hover { color: var(--rust-light); }


/* ── SCROLL REVEAL ───────────────────────────────────────────
   Elements start invisible and slightly shifted down.
   When JS adds .visible (via IntersectionObserver in HTML),
   the transition plays and they fade up into position.
   .delay-1/2/3/4 staggers cards so they animate one after another. */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }
.delay-3 { transition-delay: .3s; }
.delay-4 { transition-delay: .4s; }


/* ============================================================
   MOBILE STYLES — max-width: 768px
   Everything below only applies on phone-sized screens.
   The desktop styles above are completely untouched.
   ============================================================ */
@media (max-width: 1024px) {

  /* ── NAVIGATION ──────────────────────────────────────────
     Hide the normal link list. Show the hamburger button.
     When .open is toggled by JS, the menu drops down below
     the nav bar as a full-width vertical list.               */
  nav {
    height: 100px;
    padding: 0 5% 0 0%;
    position: relative; /* needed so the open menu drops below */
  }

  .nav-logo img {
  margin-left: -20px;
}

  

  /* Hide desktop links by default on mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;       /* sits right below the nav bar */
    left: 0;
    right: 0;
    background: var(--sand);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }

  /* When JS adds .open, show the menu */
  .nav-links.open {
    display: flex;
  }

  /* Each link takes full width with generous tap target */
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: .9rem 5%;
    font-size: .82rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-links li:last-child a {
    border-bottom: none;
  }

  /* "Kontakta oss" button: full width, centred, inside the menu */
  .nav-cta {
    display: block;
    margin: .6rem 5%;
    text-align: center;
    border-radius: 3px;
  }

  /* Hamburger button: shown on mobile, hidden on desktop (see rule below media query) */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
  }

  /* Each line of the hamburger */
  .nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--stone);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
    transform-origin: center;
  }

  /* Animate hamburger → X when .open */
  .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


  /* ── HERO ────────────────────────────────────────────────
     Reduce padding (nav is 70px on mobile), shrink text.   */
  #hero {
    padding: 90px 5% 3rem;
    min-height: 100svh; /* svh = safe viewport height, avoids browser chrome overlap */
    align-items: flex-start;
  }

  .hero-inner {
    text-align: left;
    max-width: 100%;
  }

  .hero-title {
    font-size: clamp(2.8rem, 11vw, 4.5rem);
    margin-bottom: 1.2rem;
    line-height: 0.96;
  }

  .hero-desc {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 100%;
    margin-bottom: 2rem;
  }

  /* Stats: 2×2 grid instead of 4 in a row */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    justify-items: start;
  }

  .stat-number { font-size: 2rem; }
  .stat-label  { font-size: .65rem; }


  /* ── TICKER ──────────────────────────────────────────────
     Works fine as-is, just slightly tighter padding.       */
  .ticker-item { padding: 0 1.5rem; font-size: .8rem; }


  /* ── SHARED SECTION PADDING ─────────────────────────────
     Reduce all section breathing room for smaller screens. */
  .section { padding: 4rem 5%; }

  .sec-title { font-size: clamp(1.9rem, 7vw, 2.6rem); }


  /* ── TJÄNSTER (Services) ─────────────────────────────────
     Header: stacked (1 column). Cards: 1 column.           */
  .svc-head {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-bottom: 2rem;
  }

  .svc-grid {
    grid-template-columns: 1fr;
  }

  /* Remove right border on cards since there's only 1 column */
  .svc-card {
    border-right: none;
    padding: 1.8rem 1.4rem;
  }


  /* ── VARFÖR FRIDHEM (Why Us) ─────────────────────────────
     Stack heading above benefit cards.                      */
  #varfor { padding: 4rem 5%; }

  .why-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .why-item { padding: 1.1rem 1.2rem; }

  .why-item-title { font-size: .95rem; }
  .why-item-body  { font-size: .82rem; }


  /* ── GALLERY ─────────────────────────────────────────────
     Replace the 12-column mosaic with a simple 2-column grid.
     All cells same height, images fill them.                */
  #bilder { padding: 4rem 5%; }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;        /* let rows size automatically */
    gap: 6px;
  }

  /* Override the mosaic column spans — all cells same width */
  .g-item:nth-child(1),
  .g-item:nth-child(2),
  .g-item:nth-child(3),
  .g-item:nth-child(4),
  .g-item:nth-child(5) {
    grid-column: span 1;
    grid-row: span 1;
    height: 180px;
  }

  /* First image gets full width so it has a hero quality */
  .g-item:nth-child(1) {
    grid-column: span 2;
    height: 220px;
  }


  /* ── RECENSIONER (Reviews) ───────────────────────────────
     All rows become 1 column.                              */
  #recensioner { padding: 4rem 5%; }

  .reviews-row.r3,
  .reviews-row.r2 {
    grid-template-columns: 1fr;
  }

  .rev-card { padding: 1.6rem 1.4rem; }
  .rev-text { font-size: .87rem; }


  /* ── KONTAKT (Contact) ───────────────────────────────────
     Stack info left + form right into a single column.     */
  #kontakt { padding: 4rem 5%; }

  .kontakt-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Form: side-by-side field pairs become single column */
  .f-row { grid-template-columns: 1fr; }

  .form-card { padding: 2rem 1.4rem; }

  .form-card h3 { font-size: 1.3rem; }


  /* ── FOOTER ──────────────────────────────────────────────
     Stack the three footer items and centre them.          */
  footer {
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
    padding: 2rem 5%;
  }

  .f-nav {
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
  }

} /* end @media (max-width: 768px) */


/* ── HAMBURGER HIDDEN ON DESKTOP ──────────────────────────────
   This rule sits OUTSIDE the media query intentionally.
   It ensures the hamburger button is never visible on desktop
   regardless of screen size, JS state, or anything else.       */

