/* ==========================================================================
   Sixten Hultbäck — portfolio (v2)
   Designspråk: "Varm editorial personal brand"
   Serif-rubriker (Fraunces) + ren sans (Inter), ljust & varmt, mjuka kort.
   Röd tråd: allt pekar mot taekwondon. Mobil-först. Ren CSS, inga ramverk.
   ========================================================================== */

/* ---------- Designtokens ----------------------------------------------------
   ACCENT byts på EN rad: ändra --accent. Textvarianten härleds automatiskt.
   -------------------------------------------------------------------------- */
:root {
  /* Färg — varm, ljus palett */
  --bg:           #FBF7F1;   /* varm off-white */
  --surface:      #FFFFFF;   /* kort */
  --surface-warm: #F4ECE0;   /* varm tint: alternerande sektioner, callout */
  --ink:          #2A241F;   /* text (varm nästan-svart) */
  --ink-soft:     #5F564C;   /* sekundär text */
  --muted:        #938779;   /* dämpad */
  --line:         rgba(42, 36, 31, 0.10);
  --line-strong:  rgba(42, 36, 31, 0.20);

  --accent:       #E8622A;   /* ← bränd orange (byt här) */
  --accent-ink:   #FFFFFF;
  --accent-text:  color-mix(in srgb, var(--accent) 80%, #000);  /* accent för liten text (kontrast) */
  --accent-soft:  color-mix(in srgb, var(--accent) 12%, var(--bg));
  --accent-tint:  color-mix(in srgb, var(--accent) 8%, var(--surface));

  /* Typografi */
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Form */
  --radius:    16px;
  --radius-sm: 10px;
  --pill:      999px;
  --wrap:      1140px;
  --pad-x:     clamp(1.15rem, 5vw, 2.5rem);
  --sec-y:     clamp(3.5rem, 9vw, 6.5rem);

  --shadow-sm: 0 1px 2px rgba(42,36,31,.06), 0 1px 3px rgba(42,36,31,.05);
  --shadow:    0 8px 30px rgba(42,36,31,.09);
  --shadow-lg: 0 18px 48px rgba(42,36,31,.13);
}

/* ---------- Reset / bas ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; color: inherit; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; overflow-wrap: break-word; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) 0; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Layout --------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad-x); }
.section { padding-block: var(--sec-y); }
.section-warm { background: var(--surface-warm); }

/* Låt grid-/flex-barn krympa under sitt innehåll (annars overflow på mobil) */
.hero-copy, .about-copy, .why-copy, .contact-info, .tl-body, .proj-body, .service-card { min-width: 0; }
.eyebrow { overflow-wrap: break-word; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.9rem;
}
.sec-head { max-width: 42rem; margin-bottom: 2.5rem; }
.sec-title { font-size: clamp(1.8rem, 5.5vw, 2.9rem); }
.sec-lead { color: var(--ink-soft); font-size: clamp(1.02rem, 3vw, 1.18rem); margin-top: 1rem; max-width: 46ch; }
.todo { color: var(--accent-text); }

/* ---------- Header / nav --------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.brand { font-family: var(--font-serif); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.01em; }

.nav-links {
  position: fixed; inset: 64px 0 auto 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
  flex-direction: column; padding: 0.5rem var(--pad-x) 1.25rem; gap: 0.15rem;
  display: none; box-shadow: var(--shadow);
}
.nav-links.is-open { display: flex; }
.nav-links a { padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-weight: 500; color: var(--ink); }
.nav-links a:last-child { border-bottom: 0; }
.nav-links .nav-cta { color: var(--accent-text); font-weight: 600; }

.nav-tools { display: flex; align-items: center; gap: 0.9rem; }
.lang-switch { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; }
.lang-btn { background: none; border: 0; padding: 0.2rem; color: var(--muted); transition: color 0.15s; }
.lang-btn.is-active { color: var(--accent-text); }
.lang-btn:hover { color: var(--ink); }
.lang-sep { color: var(--line-strong); }

.nav-toggle {
  width: 42px; height: 42px; display: inline-flex; flex-direction: column;
  justify-content: center; gap: 5px; background: none; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0 9px;
}
.nav-toggle span { height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Knappar -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-weight: 600; font-size: 0.98rem; padding: 0.85rem 1.6rem; border-radius: var(--pill);
  border: 1.5px solid transparent; transition: transform 0.12s ease, background 0.15s, box-shadow 0.15s, color 0.15s;
  min-height: 50px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-text); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-block { width: 100%; }

.text-link { display: inline-block; font-weight: 600; color: var(--accent-text); margin-top: 0.35rem; }
.text-link:hover { color: var(--ink); }

/* ---------- Foto-platshållare (mjuka, varma) ------------------------------- */
.ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--surface-warm), color-mix(in srgb, var(--accent) 6%, #ece2d3));
  color: var(--muted); border-radius: var(--radius); min-height: 180px; text-align: center; padding: 1rem;
}
.ph-ico {
  width: 30px; height: 30px; background-color: var(--muted); flex: none;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.6'/%3E%3Cpath d='M21 15l-5-5L5 20'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.6'/%3E%3Cpath d='M21 15l-5-5L5 20'/%3E%3C/svg%3E");
}
.ph-soon .ph-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}
.ph-label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
/* Riktig bild i en .ph-box (ersätter platshållarens gradient/ikon) */
.ph.has-img { background: none; padding: 0; overflow: hidden; }
.ph.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.ph-portrait { aspect-ratio: 4 / 5; }
.ph-square { aspect-ratio: 1 / 1; }
.ph-shot { aspect-ratio: 16 / 10; border-radius: 0; min-height: 0; }
.ph-soon { background: linear-gradient(135deg, #efe7db, #e7ddce); }
.ph-stop { aspect-ratio: 4 / 3; min-height: 0; }

/* ---------- Hero ----------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 5.5rem); }
.hero-grid { display: grid; gap: clamp(2rem, 6vw, 3.5rem); align-items: center; }
.hero-title { font-size: clamp(2.6rem, 12vw, 5rem); font-weight: 600; margin-bottom: 1.25rem; }
.hero-title .amp { font-style: italic; font-weight: 400; color: var(--muted); }
.hero-title .accent-text { color: var(--accent); }
.hero-sub { font-size: clamp(1.08rem, 3.6vw, 1.3rem); color: var(--ink-soft); max-width: 40ch; line-height: 1.55; }
.hero-sub strong, .about-copy strong { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

.hero-photo { position: relative; }

/* ---------- Om mig + callout ----------------------------------------------- */
.about-grid { display: grid; gap: clamp(2rem, 6vw, 3.5rem); align-items: start; }
.about-copy p { color: var(--ink-soft); margin-top: 1rem; max-width: 60ch; }
.callout {
  margin-top: 2rem; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
}
.callout-title { font-family: var(--font-serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); margin-bottom: 0.5rem; }
.callout p:last-child { color: var(--ink-soft); margin: 0; }

/* ---------- Meriter — vågrät tidslinje + totaler --------------------------- */
#meriter .wrap { position: relative; }
.merits-head { display: grid; gap: 1.5rem; }
.merits-totals {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); align-self: start;
}
.merits-totals h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; margin-bottom: 0.8rem; }
.merits-totals ul { display: grid; gap: 0.5rem; }
.merits-totals li { display: flex; gap: 0.55rem; align-items: baseline; font-size: 0.95rem; color: var(--ink-soft); }
.tnum { font-family: var(--font-serif); font-weight: 700; color: var(--accent-text); font-size: 1.05rem; min-width: 1.9em; }
.merits-intro { margin-top: 0.9rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; max-width: 52ch; }
.htl { margin-top: 2.5rem; }
.htl-scroll {
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; padding: 0.25rem 0.25rem 0.75rem;
}
.htl-track { position: relative; display: flex; min-width: min-content; }
.htl-line {   /* EN rak vågrät linje mellan första och sista nålen (8 stopp) */
  position: absolute; left: 6%; right: 6%; top: 50%; height: 0;
  border-top: 2px dashed var(--accent); opacity: 0.55; transform: translateY(-50%); z-index: 0;
}
.htl-item { position: relative; flex: 1 0 130px; height: 500px; scroll-snap-align: center; }
.htl-marker {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center; z-index: 2;
  box-shadow: 0 0 0 5px var(--surface-warm), var(--shadow-sm);
}
.htl-year { font-size: 0.72rem; font-weight: 700; }
.htl-card { position: absolute; left: 50%; transform: translateX(-50%); width: 92%; max-width: 190px; text-align: center; }
.htl-card::after {   /* kopplare kort ↔ nål */
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); width: 2px; height: 24px; background: var(--accent); opacity: 0.45;
}
.htl-above .htl-card { bottom: calc(50% + 30px); }
.htl-above .htl-card::after { top: 100%; }
.htl-below .htl-card { top: calc(50% + 30px); }
.htl-below .htl-card::after { bottom: 100%; }
.htl-photo { margin-bottom: 0.7rem; }
.ph-htl { aspect-ratio: auto; height: 100px; min-height: 0; }
.htl-title { font-size: 1.35rem; margin-bottom: 0.1rem; }
.htl-desc { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.4; }
/* VM = världsmästare, framhävd */
.htl-item--vm .htl-marker { background: var(--ink); width: 54px; height: 54px; }
.htl-item--vm .htl-title { color: var(--accent-text); }
.htl-hint { text-align: center; margin-top: 1rem; font-size: 0.82rem; color: var(--muted); }

/* Sponsor-förmåner + bilder */
.sponsor-perks { display: grid; gap: 2rem; margin-top: 2.25rem; margin-bottom: 2.5rem; }
.minor-heading { font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem; margin-bottom: 1rem; }
.sponsor-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.shot figcaption { margin-top: 0.6rem; text-align: center; font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); }
.ph-shot-sq { aspect-ratio: 4 / 5; }

/* ---------- Projekt -------------------------------------------------------- */
.proj-grid { display: grid; gap: 1.5rem; }
.proj-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.proj-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.browser { border-bottom: 1px solid var(--line); }
.browser-bar { display: flex; gap: 6px; padding: 11px 13px; background: var(--surface-warm); }
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.proj-body { padding: 1.4rem 1.5rem 1.6rem; }
.proj-body h3 { font-size: 1.4rem; }
.proj-body p { color: var(--ink-soft); margin: 0.5rem 0 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.5rem; }
.tags li {
  font-size: 0.78rem; font-weight: 600; color: var(--ink-soft);
  background: var(--surface-warm); border: 1px solid var(--line); border-radius: var(--pill);
  padding: 0.28rem 0.7rem;
}
.proj-soon { border-style: dashed; box-shadow: none; }

/* ---------- Tjänster ------------------------------------------------------- */
.service-grid { display: grid; gap: 1.5rem; }
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.7rem; box-shadow: var(--shadow-sm);
}
.svc-ico {
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border-radius: 14px; margin-bottom: 1.1rem; color: var(--accent-text);
}
.svc-ico svg { width: 26px; height: 26px; }
.service-card h3 { font-size: 1.5rem; }
.service-card > p { color: var(--ink-soft); margin: 0.6rem 0 1.2rem; }
.check-list li { position: relative; padding-left: 1.75rem; margin-top: 0.6rem; color: var(--ink-soft); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent);
  font-weight: 700; width: 1.2rem; text-align: center;
}
.service-card .text-link { margin-top: 1.25rem; }

/* ---------- Varför anlita mig ---------------------------------------------- */
.why-grid { display: grid; gap: 2rem; align-items: start; }
.why-list { display: grid; gap: 0.9rem; }
.why-list li {
  position: relative; padding: 1rem 1.1rem 1rem 3rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 500; box-shadow: var(--shadow-sm);
}
.why-list li::before {
  content: "✓"; position: absolute; left: 1.1rem; top: 1rem; color: var(--accent); font-weight: 700;
}
.why-highlight { background: var(--accent-soft) !important; border-color: color-mix(in srgb, var(--accent) 25%, transparent) !important; }

/* ---------- Sponsorer — logg-karusell -------------------------------------- */
.logo-carousel {
  position: relative; margin-top: 1rem; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logo-track { display: flex; gap: 1rem; width: max-content; animation: scroll-x 32s linear infinite; }
.logo-carousel--reverse .logo-track { animation-direction: reverse; animation-duration: 30s; }
.logo-slot {
  flex: 0 0 auto; width: 180px; height: 104px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem; overflow: hidden; box-shadow: var(--shadow-sm);
}
.logo-slot img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.sponsors-current-title { margin-top: 2.75rem; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.sponsor-cta {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-top: 2rem;
}
.sponsor-cta p { color: var(--ink-soft); max-width: 46ch; }

/* ---------- Kontakt -------------------------------------------------------- */
.contact-grid { display: grid; gap: 2.5rem; align-items: start; }
.contact-mail { display: inline-block; margin-top: 1.5rem; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; color: var(--accent-text); }
.contact-mail:hover { color: var(--ink); }
.socials { display: flex; gap: 1.25rem; margin-top: 1rem; }
.socials a { font-weight: 600; color: var(--ink-soft); border-bottom: 1.5px solid var(--line-strong); padding-bottom: 2px; }
.socials a:hover { color: var(--accent-text); border-color: var(--accent); }
.contact-loc { margin-top: 1.25rem; color: var(--muted); }

.contact-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2rem); box-shadow: var(--shadow-sm); display: grid; gap: 1.1rem;
}
.field { display: grid; gap: 0.45rem; }
.field label, .field legend { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.8rem 0.9rem; width: 100%; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; }

.field-interest { border: 0; padding: 0; }
.field-interest legend { margin-bottom: 0.6rem; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0.5rem 0.5rem 0;
  padding: 0.5rem 0.9rem; border: 1.5px solid var(--line-strong); border-radius: var(--pill);
  font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.chip input { accent-color: var(--accent); width: 16px; height: 16px; }
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.form-note { font-weight: 600; color: var(--accent-text); min-height: 1.2em; }
.form-note.is-error { color: #c0392b; }
/* honeypot — dold spam-fälla, aldrig synlig för människor */
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0 !important; pointer-events: none; }
/* skickar-läge på knappen */
.btn.is-sending { opacity: 0.65; pointer-events: none; }

/* ---------- Tack-popup (modal) --------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(26, 22, 18, 0.55); backdrop-filter: blur(3px); animation: modal-fade 0.25s ease; }
.modal-box {
  position: relative; background: var(--surface); border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  padding: 2.25rem 1.75rem 1.75rem; max-width: 440px; width: 100%; text-align: center;
  animation: modal-pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.modal-check { width: 68px; height: 68px; margin: 0 auto 1.1rem; }
.modal-check svg { width: 100%; height: 100%; }
.mc-ring { stroke: var(--accent); stroke-width: 2.5; opacity: 0.35; }
.mc-tick { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: mc-draw 0.45s 0.15s ease forwards; }
.modal-title { font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.25; margin-bottom: 0.6rem; }
.modal-text { color: var(--ink-soft); margin-bottom: 1.6rem; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes mc-draw { to { stroke-dashoffset: 0; } }

/* ---------- Footer --------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.75rem; background: var(--surface-warm); }
.footer-inner { display: grid; gap: 1.5rem; }
.footer-brand { font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; }
.footer-tag { color: var(--ink-soft); max-width: 42ch; margin-top: 0.35rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.9rem 1.4rem; }
.footer-nav a { color: var(--ink-soft); font-weight: 500; }
.footer-nav a:hover { color: var(--accent-text); }
.footer-meta { color: var(--muted); font-size: 0.9rem; }

/* ---------- Focus-visible -------------------------------------------------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}

/* ---------- Reveal (bara när JS är på — annars visas allt direkt) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced-motion ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .logo-track { animation: none !important; }
}

/* ==========================================================================
   Responsivt — mobil-först, expanderar uppåt
   ========================================================================== */
@media (min-width: 620px) {
  .proj-grid, .service-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr auto; align-items: end; }
}

/* Tre tjänster (webbdesign · AI-automation · AI-konsult) på rad när det får plats */
@media (min-width: 980px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  .service-card { padding: 1.75rem 1.5rem; }
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-links {
    position: static; display: flex; flex-direction: row; background: none;
    border: 0; padding: 0; gap: 1.5rem; box-shadow: none; align-items: center;
  }
  .nav-links a { border: 0; padding: 0.3rem 0; position: relative; font-weight: 500; }
  .nav-links a:not(.nav-cta)::after {
    content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 2px;
    background: var(--accent); transition: width 0.2s;
  }
  .nav-links a:not(.nav-cta):hover::after { width: 100%; }
  .nav-links .nav-cta { background: var(--accent); color: var(--accent-ink); padding: 0.5rem 1.1rem; border-radius: var(--pill); }
  .nav-links .nav-cta:hover { background: var(--accent-text); }

  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .about-grid { grid-template-columns: 1.3fr 0.7fr; }
  .why-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 3rem; }
}

@media (min-width: 720px) {
  .sponsor-perks { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 2.5rem; }
}

@media (min-width: 760px) {
  .merits-head { grid-template-columns: 1fr minmax(300px, 380px); align-items: start; gap: 2.5rem; }
}
@media (min-width: 1140px) {
  .htl-hint { display: none; }   /* allt får plats — ingen svep-hint på desktop */
}
