/* ============================================================
   DANIEL HÁKON — Icelandic Fine Art Photography
   Dark, cinematic, editorial. Type scales fluidly with viewport.
   ============================================================ */

:root {
  --bg: #0e1113;
  --bg-2: #14181b;
  --ink: #e9e5dd;
  --muted: #9a958a;
  --faint: #6d6960;
  --accent: #c9a35c;
  --hairline: rgba(233, 229, 221, 0.14);
  --hairline-soft: rgba(233, 229, 221, 0.08);
  --wall: #b9b3a9;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --max: 84rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.95rem, 0.85rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

/* prevent intrinsic-width grid/flex blowout on narrow screens */
.work-media, .work-text, .print-story, .print-panel,
.about-media, .about-text, .coll-card, .hero-content { min-width: 0; }
body { overflow-x: clip; }

a { color: inherit; text-decoration: none; }

::selection { background: rgba(201, 163, 92, 0.35); }

/* ---------- typography helpers ---------- */

.label {
  font-family: var(--sans);
  font-size: clamp(0.65rem, 0.6rem + 0.15vw, 0.78rem);
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.label--accent { color: var(--accent); }

.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: 0.005em;
}

.prose p + p { margin-top: 1.2em; }
.prose { color: var(--muted); max-width: 38em; }
.prose strong { color: var(--ink); font-weight: 400; }

.num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.site-header.scrolled {
  background: rgba(14, 17, 19, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.5rem) var(--pad);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark span { color: var(--accent); }

.site-nav { display: flex; gap: clamp(1.2rem, 2.5vw, 2.75rem); }

.site-nav a {
  font-size: clamp(0.68rem, 0.62rem + 0.15vw, 0.8rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.35em;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.site-nav a:hover, .site-nav a.active { color: var(--ink); border-color: var(--accent); }

.nav-toggle { display: none; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(100svh, 68rem);
  display: flex;
  align-items: flex-end;
}

.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: center 40%; }

.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(14,17,19,0.42) 0%, rgba(14,17,19,0.05) 30%, rgba(14,17,19,0.08) 55%, rgba(14,17,19,0.88) 100%);
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(4rem, 9vh, 7rem);
}

.hero-content .label { margin-bottom: 1.4rem; }

.hero-title {
  font-size: clamp(2.4rem, 1.2rem + 5.6vw, 6.5rem);
  max-width: 11em;
}

.hero-sub {
  margin-top: 1.6rem;
  max-width: 34em;
  color: rgba(233, 229, 221, 0.82);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.15rem);
}

.hero-cta { margin-top: 2.4rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-size: clamp(0.68rem, 0.64rem + 0.1vw, 0.78rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 1em 2.4em;
  border: 1px solid var(--hairline);
  color: var(--ink);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.btn--solid { background: var(--accent); border-color: var(--accent); color: #14100a; }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- sections ---------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 9rem) var(--pad);
}

.section--tight { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }

.section-head { margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.section-head .label { margin-bottom: 1.1rem; }
.section-head .display { font-size: clamp(1.9rem, 1.2rem + 3vw, 4rem); max-width: 16em; }

.rule { border: 0; border-top: 1px solid var(--hairline-soft); }

/* ---------- statement ---------- */

.statement {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1rem + 1.8vw, 2.6rem);
  font-weight: 300;
  line-height: 1.45;
  max-width: 28em;
  color: var(--ink);
}

.statement em { color: var(--accent); font-style: italic; }

/* ---------- editorial work rows ---------- */

.work {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: end;
  margin-bottom: clamp(5rem, 11vw, 10rem);
}

.work:last-child { margin-bottom: 0; }

.work-media { grid-column: 1 / 9; position: relative; overflow: hidden; }
.work--flip .work-media { grid-column: 5 / 13; order: 2; }

.work-media img {
  width: 100%;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-media a:hover img { transform: scale(1.025); }

.work-text { grid-column: 9 / 13; padding-bottom: 0.5rem; }
.work--flip .work-text { grid-column: 1 / 5; order: 1; }

.work-index {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.35rem);
  color: var(--accent);
  margin-bottom: 1rem;
}

.work-title {
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 3rem);
  margin-bottom: 0.9rem;
}

.work-title a { transition: color 0.3s ease; }
.work-title a:hover { color: var(--accent); }

.work-loc { margin-bottom: 1.3rem; }

.work-desc { color: var(--muted); font-size: 0.95em; max-width: 30em; }

.work-meta {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.work-price { font-size: 0.9em; color: var(--ink); letter-spacing: 0.06em; }

.work-link {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.work-link:hover { border-color: var(--accent); }

/* ---------- craft strip ---------- */

.craft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
}

.craft-item h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.6rem);
  margin: 1.1rem 0 0.7rem;
}

.craft-item p { color: var(--muted); font-size: 0.92em; max-width: 26em; }

.craft-index { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.1rem; }

/* ---------- about band ---------- */

.about-band {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: center;
}

.about-band .about-media { grid-column: 1 / 7; overflow: hidden; }
.about-band .about-text { grid-column: 7 / 13; }

/* ---------- full-bleed banner ---------- */

.banner {
  position: relative;
  min-height: clamp(22rem, 60vh, 38rem);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.banner-scrim { position: absolute; inset: 0; background: rgba(14, 17, 19, 0.58); }

.banner-content {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: clamp(4rem, 8vw, 6rem) var(--pad);
  text-align: center;
}

.banner-content .display { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.8rem); margin: 1rem auto 1.4rem; max-width: 18em; }
.banner-content .prose { margin: 0 auto 2.2rem; }

/* ---------- print detail page ---------- */

.print-hero {
  padding-top: clamp(6rem, 12vh, 9rem);
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.print-hero figure { margin: 0; }
.print-hero figcaption {
  margin-top: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.print-body {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
}

.print-story { grid-column: 1 / 8; }
.print-panel { grid-column: 8 / 13; }

.print-title { font-size: clamp(2rem, 1.4rem + 2.6vw, 4rem); margin: 0.6rem 0 1.2rem; }

.spec {
  border-top: 1px solid var(--hairline-soft);
  padding: 1.05rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
}

.spec:last-of-type { border-bottom: 1px solid var(--hairline-soft); }

.spec dt { color: var(--muted); font-size: 0.82em; letter-spacing: 0.12em; text-transform: uppercase; }
.spec dd { text-align: right; font-size: 0.95em; }
.spec dd small { display: block; color: var(--faint); font-size: 0.82em; }

.panel-card {
  border: 1px solid var(--hairline-soft);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--bg-2);
}

.panel-card .btn { width: 100%; text-align: center; margin-top: 1.6rem; }

.panel-note { margin-top: 1.1rem; font-size: 0.78em; color: var(--faint); text-align: center; }

/* in-situ preview */

.insitu {
  background: var(--wall);
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.06), rgba(0,0,0,0) 30%, rgba(0,0,0,0.14));
  padding: clamp(3rem, 9vw, 7rem) var(--pad);
  display: flex;
  justify-content: center;
}

.insitu-frame {
  background: #f6f4ef;
  padding: clamp(0.9rem, 2.2vw, 1.9rem);
  border: 1px solid #17181a;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.38), 0 4px 14px rgba(0, 0, 0, 0.25);
  max-width: min(56rem, 78%);
}

/* prev / next */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--hairline-soft);
}

.pager a {
  padding: clamp(1.8rem, 4vw, 3rem) var(--pad);
  transition: background 0.3s ease;
}

.pager a:hover { background: var(--bg-2); }
.pager a + a { border-left: 1px solid var(--hairline-soft); text-align: right; }
.pager .label { display: block; margin-bottom: 0.5rem; }
.pager .display { font-size: clamp(1.2rem, 1rem + 1vw, 1.9rem); }

/* ---------- collection grid page ---------- */

.coll-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem) clamp(1.5rem, 3vw, 3rem);
}

.coll-card { position: relative; overflow: hidden; display: block; }
.coll-card img { width: 100%; transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1); }
.coll-card:hover img { transform: scale(1.03); }

.coll-card-text { padding: 1.2rem 0 0.4rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.coll-card-text h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.15rem, 1rem + 0.8vw, 1.7rem); }
.coll-card-text .work-price { color: var(--muted); }

/* ---------- forms / contact ---------- */

.contact-card { border: 1px solid var(--hairline-soft); background: var(--bg-2); padding: clamp(2rem, 4vw, 3.5rem); max-width: 44rem; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--hairline-soft); margin-top: clamp(4rem, 8vw, 7rem); }

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) var(--pad) clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
}

.footer-brand p { color: var(--faint); font-size: 0.85em; max-width: 24em; margin-top: 1rem; }

.footer-col h4 {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 1.2rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.7rem; color: var(--faint); font-size: 0.88em; }
.footer-col li a { font-size: 1em; }
.footer-col a { color: var(--faint); font-size: 0.88em; transition: color 0.3s ease; }
.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem var(--pad) 2rem;
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 0.75em;
  letter-spacing: 0.08em;
}

/* ---------- reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */

@media (max-width: 60rem) {
  .work, .work--flip { grid-template-columns: 1fr; align-items: start; }
  .work-media, .work--flip .work-media { grid-column: 1 / -1; order: 0; }
  .work-text, .work--flip .work-text { grid-column: 1 / -1; order: 1; }
  .about-band .about-media, .about-band .about-text { grid-column: 1 / -1; }
  .print-story, .print-panel { grid-column: 1 / -1; }
  .coll-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }

  .site-nav {
    position: fixed;
    inset: 0;
    background: rgba(14, 17, 19, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .site-nav.open { opacity: 1; pointer-events: auto; }
  .site-nav a { font-size: 1rem; }

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 110;
    background: none;
    border: 0;
    width: 2rem;
    height: 1.5rem;
    cursor: pointer;
  }

  .nav-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--ink);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-toggle span:nth-child(1) { top: 20%; }
  .nav-toggle span:nth-child(2) { top: 50%; }
  .nav-toggle span:nth-child(3) { top: 80%; }

  .nav-toggle.open span:nth-child(1) { transform: translateY(0.45rem) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-0.45rem) rotate(-45deg); }
}

@media (min-width: 100rem) {
  :root { --max: 96rem; }
}
