/* ==========================================================================
   Havn — Scandinavian template
   Cool Nordic calm: snow whites, fjord blue, soft serif accents, airy space
   Distinct from v1 (warm editorial) and v2 (brutalist)
   ========================================================================== */

:root {
  --ember: #e94e1b;
  --ember-soft: rgba(233, 78, 27, 0.1);

  --snow: #f8f9fa;
  --white: #ffffff;
  --ice: #e4eaef;
  --mist: #9aabb5;
  --fjord: #5a7d8c;
  --fjord-deep: #3d5f6e;
  --pine: #4a6356;
  --bark: #9a8474;
  --ink: #2c3338;
  --ink-soft: #5a656d;

  --font-sans: "Manrope", system-ui, sans-serif;
  --font-serif: "Lora", Georgia, serif;

  --wrap: min(1080px, 90vw);
  --header-h: 4.25rem;
  --radius: 6px;
  --radius-lg: 12px;
  --ease: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--snow);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, p {
  margin: 0;
}

address {
  font-style: normal;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--fjord);
  color: var(--white);
  font-size: 0.875rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--ease), box-shadow var(--ease);
}

.site-header.is-scrolled {
  background: rgba(248, 249, 250, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--ice);
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: var(--wrap);
  margin-inline: auto;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--white);
  transition: color var(--ease);
}

.site-header.is-scrolled .logo {
  color: var(--ink);
}

.nav ul {
  display: flex;
  gap: 2.25rem;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--ease), opacity var(--ease);
}

.site-header.is-scrolled .nav a {
  color: var(--ink-soft);
}

.nav a:hover {
  color: var(--white);
  opacity: 0.85;
}

.site-header.is-scrolled .nav a:hover {
  color: var(--fjord);
}

.menu-btn {
  display: none;
  padding: 0.25rem;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
}

.site-header.is-scrolled .menu-btn {
  color: var(--ink);
}

.nav-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--white);
  padding: 2.5rem var(--wrap);
  z-index: 99;
}

.nav-mobile[hidden] {
  display: none;
}

.nav-mobile a {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.nav-mobile li + li {
  margin-top: 0.75rem;
}

/* Hero — full bleed */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 4rem) clamp(1.5rem, 5vw, 3rem) 5rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(44, 51, 56, 0.55) 0%,
    rgba(44, 51, 56, 0.15) 45%,
    rgba(44, 51, 56, 0.08) 100%
  );
}

.hero-text {
  position: relative;
  z-index: 1;
  width: var(--wrap);
  max-width: 36rem;
  margin-inline: auto;
  color: var(--white);
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero-desc {
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  max-width: 32rem;
}

/* Intro */
.intro {
  padding: 5rem 0;
  background: var(--white);
  border-bottom: 1px solid var(--ice);
}

.intro-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: end;
}

.intro-lead {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
}

.intro-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.intro-pill {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.5rem;
  background: var(--snow);
  border-radius: var(--radius-lg);
  border: 1px solid var(--ice);
}

.pill-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
}

.pill-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fjord-deep);
}

.link-quiet {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fjord);
  transition: color var(--ease);
}

.link-quiet:hover {
  color: var(--fjord-deep);
}

/* Sections */
.section {
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.section-top {
  margin-bottom: 3.5rem;
}

.section-top h2,
.philosophy-intro h2,
.studio-text h2,
.contact-intro h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  color: var(--ink);
}

.section-note {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  max-width: 28rem;
}

/* Work — alternating rows */
.work {
  background: var(--snow);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 6vw, 5rem);
}

.project-row {
  width: 100%;
}

.project-item {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  color: inherit;
  width: var(--wrap);
  margin-inline: auto;
}

.project-row--reverse .project-item {
  direction: rtl;
}

.project-row--reverse .project-item > * {
  direction: ltr;
}

.project-fig {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ice);
}

.project-fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.project-item:hover .project-fig img {
  transform: scale(1.02);
}

.project-cat {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bark);
}

.project-copy h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 500;
  margin-top: 0.5rem;
  color: var(--ink);
}

.project-copy p {
  font-size: 0.875rem;
  color: var(--mist);
  margin-top: 0.35rem;
}

.project-link-text {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fjord);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--ease), transform var(--ease);
}

.project-item:hover .project-link-text {
  opacity: 1;
  transform: translateY(0);
}

/* Philosophy */
.philosophy {
  background: var(--white);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.philosophy-intro p {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 22rem;
}

.values {
  display: grid;
  gap: 0;
}

.values li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1.25rem;
  padding: 2rem 0;
  border-top: 1px solid var(--ice);
}

.values li:last-child {
  border-bottom: 1px solid var(--ice);
}

.value-icon {
  font-size: 0.75rem;
  color: var(--fjord);
  padding-top: 0.35rem;
}

.values h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}

.values p {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  max-width: 36rem;
  line-height: 1.6;
}

/* Studio */
.studio {
  background: var(--ice);
  background: linear-gradient(180deg, var(--snow) 0%, var(--ice) 100%);
}

.studio-split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.studio-photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.studio-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.studio-text p {
  margin-top: 1.25rem;
  color: var(--ink-soft);
  max-width: 34rem;
}

.studio-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(90, 125, 140, 0.2);
}

.studio-facts dt {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
}

.studio-facts dd {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--fjord-deep);
}

/* Sustainability */
.sustain {
  padding: 3rem 0;
  background: var(--pine);
  color: var(--white);
}

.sustain-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: baseline;
}

.sustain-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  white-space: nowrap;
}

.sustain-text {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.65;
  max-width: 52rem;
  opacity: 0.95;
}

/* Contact */
.contact {
  background: var(--white);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

.contact-intro p {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 26rem;
}

.contact-intro address {
  margin-top: 2.5rem;
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--ink-soft);
}

.contact-intro a:hover {
  color: var(--fjord);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
  background: var(--snow);
  border-radius: var(--radius-lg);
  border: 1px solid var(--ice);
}

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--ice);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--fjord);
  box-shadow: 0 0 0 3px rgba(90, 125, 140, 0.15);
}

.field textarea {
  resize: vertical;
  min-height: 6rem;
}

.btn {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.9rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  background: var(--fjord);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--ease);
}

.btn:hover {
  background: var(--fjord-deep);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--ice);
  background: var(--snow);
}

.footer-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--mist);
}

.logo--footer {
  color: var(--ink);
  justify-self: start;
}

.footer-wrap p {
  text-align: center;
}

.footer-wrap nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

.footer-wrap nav a:hover {
  color: var(--fjord);
}

/* Responsive */
@media (max-width: 900px) {
  .intro-inner,
  .philosophy-grid,
  .studio-split,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .project-item,
  .project-row--reverse .project-item {
    grid-template-columns: 1fr;
    direction: ltr;
    width: 90vw;
  }

  .studio-facts {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .sustain-inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .hero {
    padding-bottom: 3.5rem;
  }

  .footer-wrap {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .footer-wrap p {
    text-align: left;
  }

  .footer-wrap nav {
    justify-content: flex-start;
  }
}
