/* =========================================================
   Shared site styles. Edit colors/fonts here once.
   ========================================================= */

:root {
  --background: #f5f5f5;
  --foreground: #1a1a1a;
  --muted: #ebebeb;
  --muted-foreground: #6b6b6b;
  --border: #d9d9d9;
  --sand: #efece6;
  --charcoal: #232323;
  --olive: #4a4a4a;
  --slate-blue: #5a5a5a;
  --terracotta: #6f6f6f;
  --stone: #8a8a8a;
  --on-dark: #f5f5f5;

  /* =========================================================
     FONT SIZES — edit here to change text sizes site-wide.
     Each text has 3 sizes: mobile / tablet (>=768px) / laptop (>=1024px).
     ========================================================= */

  /* Header (top bar brand + Menu button) */
  --header-brand: 0.65rem;

  /* Fullscreen menu overlay */
  --menu-top-text: 0.8rem;          /* "Øystein Lønsethagen" + Close */
  --menu-link-mobile: 3rem;         /* Home / About / Contact links */
  --menu-link-tablet: 4.5rem;
  --menu-link-laptop: 6rem;
  --menu-link-num: 0.75rem;         /* small "01" numbers */
  --menu-foot-link: 0.75rem;        /* email + Instagram in footer */
  --menu-foot-meta: 0.6rem;         /* "Volda & Oslo, Norway" */

  /* Home — gallery list (left column on landing) */
  --gallery-link-mobile: 3rem;      /* Skiing / Surfing / ... */
  --gallery-link-tablet: 3rem;
  --gallery-link-laptop: 3rem;
  --gallery-num: 0.5rem;            /* small "01" numbers */
  --gallery-arrow: 0.6rem;          /* "→" hover label */

  /* Home — bio block (right side) */
  --bio-name-mobile: 1.25rem;
  --bio-name-tablet: 1.5rem;
  --bio-name-laptop: 1.875rem;
  --bio-text-mobile: 0.875rem;
  --bio-text-laptop: 1rem;

  /* About page */
  --about-h1-mobile: 1.875rem;
  --about-h1-tablet: 2.25rem;
  --about-h1-laptop: 3rem;
  --about-body: 0.875rem;

  /* Contact page */
  --contact-h1-mobile: 1.875rem;
  --contact-h1-tablet: 2.25rem;
  --contact-h1-laptop: 3rem;
  --contact-label: 0.6rem;
  --contact-value-mobile: 1rem;
  --contact-value-laptop: 1.125rem;

  /* Download page */
  --download-input-mobile: 1.5rem;
  --download-input-laptop: 2.25rem;
  --download-btn-mobile: 0.75rem;
  --download-btn-laptop: 0.875rem;

  /* Gallery page (left description column + back link) */
  --gallery-back: 0.6rem;
  --gallery-title-mobile: 3rem;
  --gallery-title-tablet: 3.75rem;
  --gallery-title-laptop: 4.5rem;
  --gallery-desc-mobile: 0.875rem;
  --gallery-desc-laptop: 1rem;

  /* Project page */
  --project-h1-mobile: 2.25rem;
  --project-h1-laptop: 3.75rem;
  --project-body-mobile: 0.875rem;
  --project-body-laptop: 1rem;
  --project-meta: 0.75rem;
  --project-label: 0.6rem;
  --category-tag: 0.6rem;
  --next-project-mobile: 1.875rem;
  --next-project-laptop: 3rem;

  /* Misc small labels */
  --label-tiny: 0.65rem;
}

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

html, body { background: var(--background); color: var(--foreground); }

body {
  font-family: 'Instrument Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.heading-serif { font-family: 'Playfair Display', serif; font-weight: 400; }
.font-dm { font-family: 'DM Sans', sans-serif; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(245, 245, 245, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
}
@media (min-width: 768px) { .site-header { padding: 1rem 2rem; } }

.site-header .brand,
.site-header .menu-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--header-brand); font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  background: none; border: 0; color: var(--foreground); cursor: pointer;
  transition: opacity 0.5s ease;
}
.site-header .menu-btn:hover { opacity: 0.4; }

/* ---------- Menu overlay ---------- */
.menu-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: none; flex-direction: column;
  background: var(--charcoal); color: var(--on-dark);
}
.menu-overlay.open { display: flex; }
.menu-overlay .menu-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
}
@media (min-width: 768px) { .menu-overlay .menu-top { padding: 1.5rem 3rem; } }
.menu-overlay .menu-top span,
.menu-overlay .menu-top button {
  font-size: var(--menu-top-text); font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--on-dark); background: none; border: 0; cursor: pointer;
}
.menu-overlay nav {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 0 1.5rem; gap: 0.5rem;
}
@media (min-width: 768px) { .menu-overlay nav { padding: 0 3rem; } }
@media (min-width: 1024px) { .menu-overlay nav { padding: 0 5rem; } }
.menu-overlay nav a {
  font-family: 'Playfair Display', serif;
  font-size: var(--menu-link-mobile); line-height: 1; padding: 0.5rem 0;
  letter-spacing: -0.01em; transition: opacity 0.3s ease;
}
@media (min-width: 768px) { .menu-overlay nav a { font-size: var(--menu-link-tablet); } }
@media (min-width: 1024px) { .menu-overlay nav a { font-size: var(--menu-link-laptop); } }
.menu-overlay nav a:hover { opacity: 0.5; }
.menu-overlay nav a .num {
  font-family: 'Instrument Sans', sans-serif;
  font-size: var(--menu-link-num); letter-spacing: 0.2em;
  color: rgba(245, 245, 245, 0.3); margin-right: 1rem;
}
.menu-overlay .menu-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 1.5rem 2.5rem;
}
@media (min-width: 768px) { .menu-overlay .menu-foot { padding: 0 3rem 2.5rem; } }
.menu-overlay .menu-foot a {
  display: block; font-size: var(--menu-foot-link); letter-spacing: 0.1em;
  color: rgba(245, 245, 245, 0.4); transition: color 0.3s ease;
}
.menu-overlay .menu-foot a:hover { color: var(--on-dark); }
.menu-overlay .menu-foot p {
  font-size: var(--menu-foot-meta); letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(245, 245, 245, 0.2);
}

/* ---------- Reusable bits ---------- */
.label-tiny {
  font-size: var(--label-tiny); text-transform: uppercase; letter-spacing: 0.25em;
  color: var(--muted-foreground);
}
.portfolio-link {
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: opacity 0.4s ease;
}
.portfolio-link:hover { opacity: 0.5; }

.fade-in { animation: fadeIn 0.8s ease-out both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Home ---------- */
.home-hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 6rem 1.5rem;
}
@media (min-width: 768px) { .home-hero { padding: 6rem 4rem; } }
.home-hero-inner {
  width: 100%; max-width: 72rem;
  display: flex; flex-direction: column; gap: 2.5rem;
}
@media (min-width: 768px) {
  .home-hero-inner { flex-direction: row; align-items: flex-start; justify-content: center; gap: 1.5rem; }
}
.gallery-toggle { display: flex; flex-direction: column; height: 400px; justify-content: space-between; }
@media (min-width: 768px) { .gallery-toggle { width: 280px; flex-shrink: 0; } }
@media (min-width: 1024px) { .gallery-toggle { width: 320px; } }
.gallery-toggle a { display: flex; align-items: baseline; gap: 0.75rem; }
.gallery-toggle .num {
  font-family: 'Instrument Sans', sans-serif;
  font-size: var(--gallery-num); letter-spacing: 0.2em;
  color: var(--muted-foreground); font-variant-numeric: tabular-nums;
}
.gallery-toggle .label {
  font-family: 'Playfair Display', serif;
  font-size: var(--gallery-link-mobile); line-height: 1; letter-spacing: -0.01em;
  color: #000; transition: opacity 0.5s ease;
}
@media (min-width: 768px) { .gallery-toggle .label { font-size: var(--gallery-link-tablet); } }
@media (min-width: 1024px) { .gallery-toggle .label { font-size: var(--gallery-link-laptop); } }
.gallery-toggle a:hover ~ a .label,
.gallery-toggle a:has(~ a:hover) .label { /* no-op fallback */ }
.gallery-toggle:hover a:not(:hover) .label { opacity: 0.4; }
.gallery-toggle .arrow {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--gallery-arrow); text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--muted-foreground);
  margin-left: 0.25rem; opacity: 0; transition: opacity 0.5s ease;
}
.gallery-toggle a:hover .arrow { opacity: 1; }

.home-bio { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 768px) { .home-bio { flex-direction: row; height: 400px; gap: 1.5rem; } }
.home-bio img { width: 14rem; object-fit: cover; }
@media (min-width: 640px) { .home-bio img { width: 16rem; } }
@media (min-width: 768px) { .home-bio img { height: 100%; width: auto; } }
.home-bio-text {
  display: flex; flex-direction: column; justify-content: space-between;
}
@media (min-width: 768px) { .home-bio-text { width: 280px; padding: 0.25rem 0; height: 100%; } }
@media (min-width: 1024px) { .home-bio-text { width: 320px; } }
.home-bio-text h2 {
  font-family: 'Playfair Display', serif; font-size: var(--bio-name-mobile);
  letter-spacing: -0.01em; color: var(--charcoal);
}
@media (min-width: 768px) { .home-bio-text h2 { font-size: var(--bio-name-tablet); } }
@media (min-width: 1024px) { .home-bio-text h2 { font-size: var(--bio-name-laptop); } }
.home-bio-text p { font-size: var(--bio-text-mobile); color: var(--muted-foreground); }
@media (min-width: 768px) { .home-bio-text p { font-size: var(--bio-text-laptop); } }

.home-masonry { padding: 0 0.75rem 6rem; column-count: 2; column-gap: 0.75rem; }
@media (min-width: 768px) { .home-masonry { padding: 0 1.5rem 6rem; column-count: 3; column-gap: 1rem; } }
@media (min-width: 1024px) { .home-masonry { padding: 0 3rem 6rem; } }
.home-masonry > div { margin-bottom: 0.75rem; break-inside: avoid; overflow: hidden; }
@media (min-width: 768px) { .home-masonry > div { margin-bottom: 1rem; } }

/* ---------- About ---------- */
.about-main { padding: 8rem 1.5rem 8rem; }
@media (min-width: 768px) { .about-main { padding: 10rem 3rem 8rem; } }
@media (min-width: 1024px) { .about-main { padding: 10rem 5rem 8rem; } }
.about-grid {
  display: grid; grid-template-columns: 1fr; gap: 3rem; max-width: 72rem;
}
@media (min-width: 768px) { .about-grid { grid-template-columns: repeat(12, 1fr); gap: 4rem; } }
.about-grid .image-col { grid-column: span 5; }
.about-grid .text-col {
  grid-column: span 5 / 12; display: flex; flex-direction: column; justify-content: center;
}
.about-grid .image-col img { filter: grayscale(100%); width: 100%; }
.about-grid h1 {
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: var(--about-h1-mobile); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 2.5rem;
}
@media (min-width: 768px) { .about-grid h1 { font-size: var(--about-h1-tablet); } }
@media (min-width: 1024px) { .about-grid h1 { font-size: var(--about-h1-laptop); } }
.about-grid p { font-size: var(--about-body); color: rgba(26,26,26,0.7); margin-bottom: 1.25rem; max-width: 24rem; }

/* ---------- Contact ---------- */
.contact-main { padding: 8rem 1.5rem 0; }
@media (min-width: 768px) { .contact-main { padding: 10rem 3rem 0; } }
@media (min-width: 1024px) { .contact-main { padding: 10rem 5rem 0; } }
.contact-main .inner { max-width: 36rem; margin-bottom: 8rem; }
.contact-main h1 {
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: var(--contact-h1-mobile); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 3.5rem;
}
@media (min-width: 768px) { .contact-main h1 { font-size: var(--contact-h1-tablet); } }
@media (min-width: 1024px) { .contact-main h1 { font-size: var(--contact-h1-laptop); } }
.contact-block { margin-bottom: 2.5rem; }
.contact-block .label {
  font-size: var(--contact-label); text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--muted-foreground); margin-bottom: 0.5rem;
}
.contact-block a, .contact-block p { font-size: var(--contact-value-mobile); }
@media (min-width: 768px) { .contact-block a, .contact-block p { font-size: var(--contact-value-laptop); } }
.section-sand {
  background: var(--sand);
  padding: 3.5rem 1.5rem;
  margin: 0 -1.5rem;
}
@media (min-width: 768px) { .section-sand { padding: 3.5rem 3rem; margin: 0 -3rem; } }
@media (min-width: 1024px) { .section-sand { padding: 3.5rem 5rem; margin: 0 -5rem; } }

/* ---------- Download ---------- */
.download-main {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 6rem 1.5rem;
}
.download-main .inner {
  width: 100%; max-width: 42rem; display: flex; flex-direction: column; gap: 2rem;
}
.download-main input {
  height: 5rem; border: 0; border-bottom: 1px solid rgba(26,26,26,0.2);
  background: transparent; padding: 0;
  font-family: 'Playfair Display', serif; font-size: var(--download-input-mobile); letter-spacing: -0.01em;
  outline: none; transition: border-color 0.3s ease; width: 100%;
}
@media (min-width: 768px) { .download-main input { height: 6rem; font-size: var(--download-input-laptop); } }
.download-main input:focus { border-bottom-color: var(--foreground); }
.download-main input::placeholder { color: rgba(107,107,107,0.4); }
.download-main button {
  width: 100%; padding: 1.5rem; background: transparent; cursor: pointer;
  border: 1px solid rgba(26,26,26,0.3);
  font-family: 'DM Sans', sans-serif; font-size: var(--download-btn-mobile);
  text-transform: uppercase; letter-spacing: 0.3em;
  transition: all 0.5s ease;
}
@media (min-width: 768px) { .download-main button { padding: 2rem; font-size: var(--download-btn-laptop); } }
.download-main button:hover:not(:disabled) { background: var(--foreground); color: var(--background); }
.download-main button:disabled { opacity: 0.3; cursor: not-allowed; }

/* ---------- Gallery page ---------- */
.gallery-main { padding-top: 5rem; }
@media (min-width: 768px) { .gallery-main { padding-top: 0; } }
.gallery-layout { display: flex; flex-direction: column; min-height: 100vh; }
@media (min-width: 768px) { .gallery-layout { flex-direction: row; } }
.gallery-desc {
  display: flex; flex-direction: column; justify-content: center;
  padding: 4rem 2rem;
}
@media (min-width: 768px) {
  .gallery-desc {
    width: 25%; position: fixed; top: 0; left: 12.5%; height: 100vh;
    padding-bottom: 3rem;
  }
}
.gallery-desc .back {
  font-size: var(--gallery-back); text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--muted-foreground); margin-bottom: 2rem; display: inline-block;
  transition: color 0.3s ease;
}
.gallery-desc .back:hover { color: var(--foreground); }
.gallery-desc h1 {
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: var(--gallery-title-mobile); line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 1.5rem;
}
@media (min-width: 768px) { .gallery-desc h1 { font-size: var(--gallery-title-tablet); } }
@media (min-width: 1024px) { .gallery-desc h1 { font-size: var(--gallery-title-laptop); } }
.gallery-desc p { font-size: var(--gallery-desc-mobile); color: var(--muted-foreground); max-width: 24rem; }
@media (min-width: 768px) { .gallery-desc p { font-size: var(--gallery-desc-laptop); } }
.gallery-photos { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem; }
@media (min-width: 768px) {
  .gallery-photos {
    margin-left: 42.5%; width: 45%; margin-right: 12.5%;
    padding: 1rem 0;
  }
}
.gallery-photos .photo { overflow: hidden; }
.gallery-photos img { width: 100%; height: auto; display: block; }*/
/*.gallery-photos img { use this for max80vh on images
  display: block;

  width: auto;
  max-width: 100%;

  height: auto;
  max-height: 80vh;

  object-fit: contain;

  margin: 0 auto;
}*/

/* ---------- Project page ---------- */
.project-main { padding: 8rem 1.5rem 0; }
@media (min-width: 768px) { .project-main { padding: 10rem 3rem 0; } }
@media (min-width: 1024px) { .project-main { padding: 10rem 5rem 0; } }
.project-header { max-width: 36rem; margin-bottom: 4rem; }
@media (min-width: 768px) { .project-header { margin-bottom: 5rem; } }
.project-header h1 {
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: var(--project-h1-mobile); line-height: 1.05; letter-spacing: -0.01em;
  margin: 1.25rem 0 2rem;
}
@media (min-width: 768px) { .project-header h1 { font-size: var(--project-h1-laptop); } }
.project-header p { font-size: var(--project-body-mobile); color: rgba(26,26,26,0.7); margin-bottom: 2rem; max-width: 32rem; }
@media (min-width: 768px) { .project-header p { font-size: var(--project-body-laptop); } }
.project-meta { display: flex; gap: 2.5rem; font-size: var(--project-meta); }
.project-meta .label {
  font-size: var(--project-label); text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--muted-foreground); display: block; margin-bottom: 0.375rem;
}
.category-tag {
  display: inline-block; padding: 0.2rem 0.6rem;
  font-size: var(--category-tag); text-transform: uppercase; letter-spacing: 0.15em; font-weight: 500;
  color: var(--on-dark);
}
.cat-ski-touring { background: var(--olive); }
.cat-backcountry { background: var(--slate-blue); }
.cat-landscape   { background: var(--stone); color: var(--foreground); }
.cat-portrait    { background: var(--terracotta); }
.cat-night       { background: var(--charcoal); }
.cat-action      { background: var(--terracotta); }
.project-images { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 768px) { .project-images { gap: 2rem; } }
.project-images img { width: 100%; height: auto; }
.next-project {
  margin-top: 6rem; border-top: 1px solid var(--border);
  padding: 3.5rem 0 5rem;
}
@media (min-width: 768px) { .next-project { margin-top: 10rem; } }
.next-project .label {
  font-size: var(--project-label); text-transform: uppercase; letter-spacing: 0.25em;
  color: var(--muted-foreground); margin-bottom: 1rem;
}
.next-project a {
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: var(--next-project-mobile); letter-spacing: -0.01em;
  transition: opacity 0.3s ease;
}
@media (min-width: 768px) { .next-project a { font-size: var(--next-project-laptop); } }
.next-project a:hover { opacity: 0.5; }

/* ===== Lightbox ===== */
.lightbox-trigger { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  display: none; align-items: center; justify-content: center;
  z-index: 9999; padding: 2vmin;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 96vw; max-height: 96vh;
  width: auto; height: auto; object-fit: contain;
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1.25rem;
  background: transparent; border: 0; color: #fff;
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer; padding: 0.5rem 0.75rem;
}
.lightbox-close:hover { opacity: 0.6; }
body.lightbox-open { overflow: hidden; }
