/* ============================================================
   Simen Trosterud – Snekker i Oslo
   Scandinavian editorial design: warm off-white, charcoal ink,
   natural wood accents, serif display + clean sans body.
   ============================================================ */

:root {
  --bg:        #f5f2ec;
  --bg-soft:   #ede8df;
  --surface:   #fbf9f5;
  --ink:       #221e19;
  --ink-soft:  #4c463e;
  --muted:     #7a7368;
  --line:      #d9d2c4;
  --wood:      #8a6749;
  --wood-dark: #6f5138;
  --dark:      #211d17;
  --dark-line: rgba(243, 239, 230, 0.16);
  --light:     #f3efe6;
  --light-mut: #a89f90;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, "Segoe UI", sans-serif;

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-pad: clamp(80px, 10vw, 150px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--wood); color: var(--light); }

:focus-visible {
  outline: 2px solid var(--wood);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--light);
  padding: 10px 20px;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h1 { font-size: clamp(2.75rem, 5.6vw, 4.6rem); }
h1 em { font-style: italic; font-weight: 400; }

h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); margin-bottom: 1.4rem; }

h3 { font-size: 1.35rem; line-height: 1.25; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wood);
  margin-bottom: 1.25rem;
}
.eyebrow-light { color: #c9a87f; }

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 34ch;
}

.signature {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin-top: 1.75rem;
}

.text-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color .25s ease, border-color .25s ease;
}
.text-link:hover { color: var(--wood); border-color: var(--wood); }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }

figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.9rem;
  letter-spacing: 0.01em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: 15px 32px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.btn-solid {
  background: var(--ink);
  color: var(--light);
}
.btn-solid:hover { background: var(--wood); border-color: var(--wood); }

.btn-outline {
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--light); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 242, 236, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 76px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 2px;
  display: block;
}

.main-nav {
  display: flex;
  gap: 30px;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color .2s ease;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--ink);
  transition: width .25s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { width: 100%; }

.header-phone {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  transition: background .25s ease, color .25s ease;
  white-space: nowrap;
}
.header-phone:hover { background: var(--ink); color: var(--light); }
.header-phone-label { font-weight: 400; color: var(--muted); transition: color .25s ease; }
.header-phone:hover .header-phone-label { color: var(--light-mut); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--ink);
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: min(980px, calc(100vh - 76px));
  height: min(980px, calc(100svh - 76px));
  min-height: 560px;
  border-bottom: 1px solid var(--line);
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 7vw, 110px) var(--gutter) clamp(48px, 7vw, 110px) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}

.hero-text h1 { margin-bottom: 1.75rem; max-width: 12ch; }
.hero-text .eyebrow { margin-bottom: 1.75rem; }
.hero-text .lead { margin-bottom: 2.75rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-media {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  margin-right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}
.hero-media figcaption {
  position: absolute;
  left: 0; bottom: 0;
  background: rgba(34, 30, 25, 0.78);
  color: var(--light);
  padding: 10px 18px;
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ---------- Om meg ---------- */
.about { background: var(--surface); border-bottom: 1px solid var(--line); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: start;
}

.about-text p + p { margin-top: 1.15em; }
.about-text p { color: var(--ink-soft); max-width: 56ch; }

.about-media {
  position: sticky;
  top: 110px;
}
.about-media img { width: 100%; }

/* ---------- Før og etter ---------- */
.ba-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.ba-head h2 { margin-bottom: 0; }
.ba-note {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 30ch;
  text-align: right;
  padding-bottom: 6px;
}

.ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
}

.ba-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ba-item {
  position: relative;
  overflow: hidden;
}
.ba-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .6, .2, 1);
}
.ba-item:hover img { transform: scale(1.09); }

.ba-tag {
  position: absolute;
  left: 0; bottom: 0;
  background: rgba(34, 30, 25, 0.78);
  color: var(--light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 14px;
}
.ba-item:last-child .ba-tag { background: var(--wood); }

.ba-caption { margin-top: 14px; }

.ba-text {
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  aspect-ratio: 4 / 3;
  padding: clamp(20px, 3vw, 36px);
}
.ba-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wood);
  margin-bottom: 10px;
}
.ba-result-name {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
}
.ba-result-detail {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------- Anmeldelser ---------- */
.review-score {
  font-weight: 600;
  color: var(--ink);
}
.ba-note .text-link { margin-top: 0; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 4vw, 56px);
}

.review-wide { grid-column: span 2; }

.review {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.review-stars {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--wood);
  margin-bottom: 16px;
}
.review-text {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
}
.review-meta {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.review-meta span { color: var(--muted); font-weight: 400; }

/* ---------- Tjenester ---------- */
.services-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: start;
}

.services-intro {
  position: sticky;
  top: 110px;
}
.services-intro p { color: var(--ink-soft); max-width: 40ch; }

.services-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  transition: padding-left .3s ease;
}
.services-list li:last-child { border-bottom: 1px solid var(--line); }
.services-list li:hover { padding-left: 10px; }

.service-num {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--wood);
  padding-top: 4px;
}

.services-list h3 { margin-bottom: 4px; }
.services-list li p {
  font-size: 0.98rem;
  color: var(--muted);
}

/* ---------- Prosjekter ---------- */
.projects { background: var(--surface); border-block: 1px solid var(--line); }

.projects-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.projects-head h2 { margin-bottom: 0; }
.projects-note {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 30ch;
  text-align: right;
  padding-bottom: 6px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(20px, 3vw, 44px);
  row-gap: clamp(48px, 6vw, 90px);
}

.project { overflow: hidden; }
.project img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .6, .2, 1);
}
.project:hover img { transform: scale(1.08); }

.project-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
}
.project-detail {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Editorial asymmetric placement */
.project-a { grid-column: 1 / 8; }
.project-b { grid-column: 8 / 13; margin-top: clamp(40px, 7vw, 130px); }
.project-c { grid-column: 1 / 6; }
.project-d { grid-column: 6 / 13; margin-top: clamp(40px, 7vw, 120px); }
.project-d img { aspect-ratio: 4 / 3; }
.project-e { grid-column: 1 / 8; }
.project-e img { aspect-ratio: 4 / 5; }
.project-f { grid-column: 8 / 13; margin-top: clamp(40px, 7vw, 120px); }
.project-f img { aspect-ratio: 3 / 4; }

/* ---------- Hvorfor Simen (dark) ---------- */
.why {
  background: var(--dark);
  color: var(--light);
}

.why h2, .why h3 { color: var(--light); }

.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: start;
}

.why-intro { position: sticky; top: 110px; }
.why-lead { color: var(--light-mut); max-width: 38ch; }

.why-list li {
  padding: 26px 0;
  border-top: 1px solid var(--dark-line);
}
.why-list li:last-child { border-bottom: 1px solid var(--dark-line); }
.why-list h3 {
  font-size: 1.45rem;
  margin-bottom: 6px;
}
.why-list p {
  color: var(--light-mut);
  font-size: 0.98rem;
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(48px, 8vw, 130px);
  align-items: start;
}

.contact-info > p { color: var(--ink-soft); max-width: 44ch; }

.contact-card {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.contact-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
}
.contact-role { color: var(--muted); margin-top: 2px; }
.contact-phone {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 1.25rem;
  transition: color .25s ease;
}
.contact-phone:hover { color: var(--wood); }
.btn-call { margin-top: 1.75rem; }

/* Form – minimal, underline inputs */
.contact-form { padding-top: 8px; }

.field { margin-bottom: 26px; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  border-radius: 0;
  transition: border-color .25s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
.field input:user-invalid { border-bottom-color: #a34a33; }

.btn-submit { width: 100%; padding-block: 17px; }

.form-note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--muted);
}

.form-success {
  margin-top: 22px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--wood);
  background: var(--surface);
}
.form-success p + p { margin-top: 6px; }
.form-success a { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 5vw, 64px) 0 calc(clamp(40px, 5vw, 64px) + 0px);
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-logo {
  width: 42px;
  height: 42px;
  border-radius: 2px;
}
.footer-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.footer-role { color: var(--muted); font-size: 0.95rem; }
.footer-contact { font-size: 0.95rem; }
.footer-contact a { border-bottom: 1px solid var(--line); transition: border-color .2s ease; }
.footer-contact a:hover { border-color: var(--ink); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-credit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-credit img {
  height: 20px;
  width: auto;
  opacity: 0.85;
  transition: opacity .2s ease;
}
.footer-credit:hover img { opacity: 1; }

/* ---------- Mobile call bar ---------- */
.mobile-call-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: var(--ink);
  color: var(--light);
  text-align: center;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .hero-text { padding: clamp(56px, 10vw, 90px) var(--gutter); }
  .hero-text h1 { max-width: none; }
  .hero-media { min-height: 0; aspect-ratio: 4 / 3; margin-right: 0; }

  .about-grid,
  .services-grid,
  .why-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .about-media,
  .services-intro,
  .why-intro { position: static; }

  .ba-head,
  .projects-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ba-note,
  .projects-note { text-align: left; max-width: none; }

  .ba-grid { grid-template-columns: 1fr; }
  .ba-text { aspect-ratio: auto; min-height: 160px; }

  .reviews-grid { grid-template-columns: 1fr; }
  .review-wide { grid-column: auto; }

  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project-a, .project-b, .project-c, .project-d, .project-e, .project-f {
    grid-column: auto;
    margin-top: 0;
  }
  .project-a { grid-column: 1 / -1; }
  .project-a img { aspect-ratio: 4 / 5; }
}

@media (max-width: 760px) {
  body { padding-bottom: 62px; } /* room for call bar */
  .mobile-call-bar { display: block; }

  .header-phone { display: none; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .main-nav.nav-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav a {
    padding: 14px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .main-nav a:last-child { border-bottom: 0; }
  .main-nav a::after { display: none; }

  .projects-grid { grid-template-columns: 1fr; }
  .project-a img { aspect-ratio: 3 / 4; }

  .services-list li { grid-template-columns: 42px 1fr; gap: 16px; }
}

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