/* ============================================================
   Sanna Westermark – portfolio
   Färger, typsnitt och mått samlade här. Ändra en variabel
   så slår det igenom på hela sajten.
   ============================================================ */

@font-face { font-family: "Averia Serif Libre"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/averia-serif-libre-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/dm-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/dm-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/dm-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/dm-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --black: #000;
  --white: #fff;
  --cream: #f9f1ec;
  --lilac: #d1b9ec;

  --serif: "Averia Serif Libre", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --header-h: 88px;

  /* Typskala, motsvarar originalet i 1440 px bredd */
  --fs-display: clamp(44px, 6.13vw, 88px);   /* Hej! I'm Sanna */
  --fs-h1-xl:   clamp(56px, 17.9vw, 258px);  /* Get in touch (kontakt) */
  --fs-h1-l:    clamp(44px, 7.18vw, 103px);  /* About-rubrik */
  --fs-h2:      clamp(38px, 4.78vw, 69px);
  --fs-h3:      clamp(24px, 2.14vw, 31px);
  --fs-quote:   clamp(20px, 1.66vw, 24px);
  --fs-lead:    clamp(19px, 1.66vw, 24px);
  --fs-body:    17px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--black); font-family: var(--sans); font-size: var(--fs-body); line-height: 1.5; letter-spacing: .01em; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 700; letter-spacing: -0.06em; margin: 0; }
h1 { font-size: var(--fs-display); line-height: 1; }
h2 { font-size: var(--fs-h2); line-height: 1.14; }
h3 { font-size: var(--fs-h3); line-height: 1.14; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 12px; }

/* ---------- Knappar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 67px; padding: 0 37px; border-radius: 300px; background: var(--black); color: var(--white); font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: -0.03em; text-decoration: none; border: 0; cursor: pointer; transition: opacity .2s; }
.btn:hover { opacity: .8; }
.btn--wide { min-width: min(100%, 316px); }
.btn--outline { background: transparent; color: var(--black); border: 1px solid var(--black); min-height: 56px; min-width: min(100%, 270px); font-weight: 400; letter-spacing: 0; }
.btn--outline:hover { background: var(--black); color: var(--white); opacity: 1; }
.btn--lilac { background: var(--lilac); color: var(--black); }
.btn--small { min-height: 71px; font-size: 15.3px; }

/* ---------- Header ---------- */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 20; height: var(--header-h); background: var(--white); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); }
.site-header .logo img { width: 281px; height: auto; }
.site-nav { display: flex; gap: 25px; }
.site-nav a { font-size: 15.3px; text-decoration: none; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; height: 1px; background: var(--black); margin: 7px 0; transition: transform .25s, opacity .25s; }
main { padding-top: var(--header-h); }

/* ---------- Sektioner ---------- */
.section { padding: 144px var(--gutter); }
.bg-cream { background: var(--cream); }
.bg-lilac { background: var(--lilac); }
.bg-black { background: var(--black); color: var(--white); }
.section-title { font-family: var(--serif); font-weight: 700; font-size: var(--fs-h2); line-height: 1.5; letter-spacing: -0.06em; margin: 0 0 1em; }
.center { text-align: center; }

/* ---------- Startsida: hero ---------- */
.hero { background: var(--cream); min-height: calc(889px - var(--header-h)); display: grid; grid-template-columns: 534fr 65fr 697fr; align-items: center; padding: 60px var(--gutter); gap: 0; }
.hero__text { grid-column: 1; }
.hero__text p { font-size: var(--fs-lead); line-height: 1.5; margin: 24px 0 50px; }
.hero__text .btn { min-width: min(100%, 370px); }
.hero__art { grid-column: 3; position: relative; aspect-ratio: 697 / 611; }
.hero__art img, .hero__art svg { position: absolute; }
.hero__art img { left: 15.6%; top: 0; width: 68.7%; height: 100%; object-fit: cover; border-radius: 20px; z-index: 3; }
.blob { fill: var(--lilac); width: 68.7%; height: 61.9%; }
.blob--a { left: 0; top: 31.75%; z-index: 2; }
.blob--b { left: 31.3%; top: 6.4%; z-index: 1; }

/* ---------- Tjänster ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.services h3 { margin-bottom: 24px; }

/* ---------- Projektkort ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 25px; }
.card h3 { margin-bottom: 25px; padding: 0 12%; }
.card p { padding: 0 12%; margin-bottom: 25px; min-height: 3em; }

/* ---------- Karusell (Kind words) ---------- */
.carousel { position: relative; }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 60px) / 3); gap: 60px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
.quote h3 { font-size: var(--fs-quote); line-height: 1.14; margin-bottom: 40px; }
.carousel__btn { position: absolute; top: 50%; transform: translateY(-50%); width: 60px; height: 60px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.carousel__btn svg { width: 44px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.carousel__btn--prev { left: calc(-1 * var(--gutter) + 6px); }
.carousel__btn--next { right: calc(-1 * var(--gutter) + 6px); }
.carousel__btn[disabled] { opacity: 0; pointer-events: none; }

/* ---------- Text + bild sida vid sida ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.split__text { padding: 144px var(--gutter); }
.split__text p { max-width: 474px; margin: 20px 0 58px; }
.split__media { align-self: stretch; min-height: 100%; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--white); text-align: center; padding: 190px var(--gutter) 200px; }
.site-footer h2 { margin-bottom: 30px; }
.site-footer nav { display: flex; justify-content: center; gap: 13px; margin-bottom: 24px; }
.site-footer nav a { text-underline-offset: 3px; }
.social { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--white); color: var(--black); }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Projects-listan ---------- */
.project-row { display: grid; grid-template-columns: 1fr 1fr; min-height: 660px; }
.project-row__media { display: block; }
.project-row__media img { width: 100%; height: 100%; object-fit: cover; }
.project-row__text { display: flex; flex-direction: column; justify-content: center; padding: 120px var(--gutter) 120px 54px; }
.project-row--flip .project-row__media { order: 2; }
.project-row--flip .project-row__text { padding: 120px 54px 120px var(--gutter); }
.project-row__text h2 { margin-bottom: 27px; }
.project-row__text p { max-width: 486px; margin-bottom: 28px; }

/* ---------- About ---------- */
.about-hero { min-height: calc(900px - var(--header-h)); display: grid; place-items: center; text-align: center; padding: 80px var(--gutter); }
.about-hero h1 { font-size: var(--fs-h1-l); max-width: 915px; }
.about { display: grid; grid-template-columns: 643fr 65fr 534fr 54fr; align-items: center; padding: 95px var(--gutter); }
.about img { grid-column: 1; width: 100%; aspect-ratio: 643 / 688; object-fit: cover; object-position: 47.6% 31.2%; border-radius: 30px; }
.about__text { grid-column: 3; }
.about__text .btn { margin-top: 40px; }

/* ---------- Kontakt ---------- */
.contact { position: relative; display: grid; grid-template-columns: 660fr 65fr 643fr 72fr; min-height: 1038px; }
.contact__title { position: absolute; z-index: 2; left: var(--gutter); top: 0; font-size: var(--fs-h1-xl); line-height: 1; color: var(--lilac); white-space: nowrap; }
.contact__img { grid-column: 1; width: 100%; height: 100%; object-fit: cover; object-position: 42.8% 7.2%; }
.contact__body { grid-column: 3; padding: calc(var(--fs-h1-xl) * 1.2) 0 80px; }
.contact__body > p { font-size: var(--fs-lead); line-height: 1.5; margin-bottom: 50px; }
.form { display: grid; gap: 22px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.form legend { padding: 0; margin-bottom: 10px; }
.form label { display: grid; gap: 6px; font-size: 14px; }
.form label small { opacity: .7; font-size: 12px; }
.form input, .form textarea { font: inherit; font-size: 16px; padding: 12px; border: 1px solid #000; border-radius: 6px; background: #fff; width: 100%; }
.form textarea { min-height: 110px; resize: vertical; }
.form .btn { justify-self: start; min-height: 50px; padding: 0 28px; }
.form-status { font-size: 15px; }
.hp { position: absolute; left: -9999px; }

/* ---------- Case-sidor ---------- */
.case-hero { height: calc(900px - var(--header-h)); background: #000 center / cover no-repeat; }
.case-hero--short { height: calc(656px - var(--header-h)); }
.case-intro { display: grid; grid-template-columns: 642fr 11fr 588fr 55fr; padding: 160px var(--gutter) 120px; }
.case-intro h2 { grid-column: 1; }
.case-intro__text { grid-column: 3; }
.tags { grid-column: 1; display: flex; flex-wrap: wrap; gap: 11px; margin-top: 50px; }
.tag { border: 2px solid var(--black); border-radius: 100px; padding: 19px 28px; font-weight: 700; min-width: 152px; text-align: center; }
.case-block { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; align-items: center; padding: 95px var(--gutter); }
.case-block h2 { margin-bottom: 20px; }
.case-block img { width: 100%; height: auto; }
.case-block--flip .case-block__media { order: 2; }
.case-full { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.case-full__media { align-self: stretch; }
.case-full__media img { width: 100%; height: 100%; object-fit: cover; }
.case-full__text { padding: 117px var(--gutter); }
.case-full__text h2 + p { margin-top: 20px; }
.case-full__text p + h2 { margin-top: 40px; }
.case-full--flip .case-full__media { order: 2; }
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; padding: 125px var(--gutter) 86px; }
.phones--spaced { gap: 0 8.4%; padding: 95px calc(var(--gutter) + 54px) 89px; }
.phones img { width: 100%; height: auto; max-height: 650px; object-fit: contain; }
.duo { position: relative; aspect-ratio: 588 / 650; }
.duo img { position: absolute; width: 63%; top: 0; }
.duo img:first-child { left: 0; }
.duo img:last-child { left: 37%; }
.case-next { display: flex; justify-content: center; padding: 0 var(--gutter) 86px; }
.case-wide { width: 100%; height: auto; }
.case-wide--cover { height: 801px; object-fit: cover; }

/* ============================================================
   Mobil och surfplatta
   ============================================================ */
@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(2, 1fr); row-gap: 60px; }
  .carousel__track { grid-auto-columns: calc((100% - 40px) / 2); gap: 40px; }
}

@media (max-width: 767px) {
  :root { --header-h: 76px; }
  body { font-size: 16px; }
  .site-header .logo img { width: 200px; }
  .menu-toggle { display: block; }
  .site-nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--white); flex-direction: column; align-items: center; justify-content: center; gap: 28px; display: none; }
  .site-nav a { font-family: var(--serif); font-weight: 700; font-size: 34px; letter-spacing: -0.04em; }
  .nav-open .site-nav { display: flex; }
  .nav-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav-open { overflow: hidden; }

  .section { padding: 80px var(--gutter); }
  .section-title { line-height: 1.2; }

  .hero { grid-template-columns: 1fr; min-height: 0; padding: 70px var(--gutter) 80px; gap: 56px; }
  .hero__art { grid-column: 1; width: 100%; max-width: 520px; justify-self: center; }
  .hero__text .btn { min-width: 0; }

  .services, .cards { grid-template-columns: 1fr; row-gap: 56px; }
  .carousel__track { grid-auto-columns: 86%; gap: 24px; }
  .carousel__btn { display: none; }

  .split, .project-row, .case-full, .case-block, .about, .contact, .case-intro { grid-template-columns: 1fr; }
  .split__text { padding: 80px var(--gutter); }
  .split__media img { aspect-ratio: 1; }

  .project-row { min-height: 0; }
  .project-row__media img { aspect-ratio: 4 / 3; }
  .project-row__text, .project-row--flip .project-row__text { padding: 40px var(--gutter) 80px; }
  .project-row--flip .project-row__media { order: 0; }

  .about-hero { min-height: 70vh; }
  .about { gap: 40px; padding: 60px var(--gutter) 80px; }
  .about img, .about__text { grid-column: 1; }

  .contact { min-height: 0; }
  .contact__title { position: static; grid-row: 1; padding: 40px var(--gutter) 24px; white-space: normal; }
  .contact__img { grid-column: 1; aspect-ratio: 4 / 5; height: auto; }
  .contact__body { grid-column: 1; padding: 48px var(--gutter) 80px; }
  .form fieldset { grid-template-columns: 1fr; }

  .case-hero, .case-hero--short { height: 62vh; }
  .case-intro { padding: 80px var(--gutter); gap: 28px; }
  .case-intro h2, .case-intro__text, .tags { grid-column: 1; }
  .tags { margin-top: 0; }
  .case-block { padding: 60px var(--gutter); gap: 40px; }
  .case-block--flip .case-block__media { order: 0; }
  .case-full__text { padding: 60px var(--gutter) 80px; }
  .case-full--flip .case-full__media { order: 0; }
  .phones, .phones--spaced { grid-template-columns: 1fr; gap: 40px; padding: 60px 15%; }
  .case-wide--cover { height: 60vh; }
  .site-footer { padding: 100px var(--gutter) 110px; }
}
