/* ==========================================================================
   Fjeld Studio — design tokens
   Neo-brutalist direction: raw grid, hard edges, exposed structure,
   architectural redline annotations.
   ========================================================================== */

:root {
  --concrete:     #D6D3CC;  /* primary background */
  --paper:        #EAE8E2;  /* raised surface / cards */
  --black:        #121212;  /* primary text, dark blocks */
  --grey-muted:   #58544B;  /* secondary text */
  --redline:      #D6321F;  /* bold decorative — borders, numerals, thick lines */
  --redline-deep: #A8250F;  /* small text / links */
  --line:         rgba(18, 18, 18, 0.16);
  --line-strong:  #121212;

  --font-display: "Big Shoulders Display", "Archivo", "Segoe UI", sans-serif;
  --font-body: "Archivo", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  --fs-hero: clamp(3.2rem, 7vw + 1rem, 7rem);
  --fs-h2: clamp(1.9rem, 2.6vw + 1rem, 2.8rem);
  --fs-h3: 1.2rem;
  --fs-body: 1.0625rem;
  --fs-mono: 0.85rem;

  --wrap: 1280px;
  --gutter: 1.25rem;
  --border: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) { :root { --gutter: 2rem; --border: 3px; } }

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background-image:
    repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 32px);
  background-color: var(--concrete);
  background-position: 0 0, 0 0;
  animation: grid-drift 50s linear infinite;
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@keyframes grid-drift {
  to { background-position: 32px 32px, 32px 32px; }
}
@media (prefers-reduced-motion: reduce) { body { animation: none; } }

img { max-width: 100%; display: block; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, dl, p, figure { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--black); color: var(--concrete);
  padding: 0.6rem 1rem; z-index: 100;
  transition: top 0.2s var(--ease);
  font-family: var(--font-mono); font-size: 0.85rem;
}
.skip-link:focus { top: 1rem; }

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

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--redline-deep);
  margin-bottom: 0.75rem;
}
.eyebrow::before { content: "// "; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 900; letter-spacing: 0.005em; line-height: 0.98; }

/* ==========================================================================
   Buttons — hard edges, no radius
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 0;
  border: var(--border) solid var(--black);
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
  min-height: 44px;
}
.btn:active { transform: translate(2px, 2px); }
.btn-small { padding: 0.6rem 1.1rem; min-height: 38px; font-size: 0.8rem; }

.btn-primary { background: var(--black); color: var(--concrete); }
.btn-primary:hover { background: var(--redline-deep); border-color: var(--redline-deep); }

.btn-ghost { background: transparent; color: var(--black); }
.btn-ghost:hover { background: var(--black); color: var(--concrete); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--concrete);
  border-bottom: var(--border) solid var(--black);
  transition: box-shadow 0.2s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 4px 0 0 var(--black); }

.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 1rem; gap: 1rem; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: var(--black);
}
.wordmark span {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--redline-deep);
  margin-top: 0.35rem;
}

/* Full-screen overlay nav on mobile/tablet; persistent horizontal bar from 1024px up
   so switching between the 5 pages on desktop is a single click, not an overlay trip. */

.header-actions { display: flex; align-items: center; gap: 1rem; }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px;
  background: transparent; border: var(--border) solid var(--black); border-radius: 0;
  cursor: pointer; padding: 0;
  position: relative;
  z-index: 61;
}
.nav-toggle span {
  display: block; height: 2px; margin-inline: 11px; background: var(--black);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] { border-color: var(--concrete); }
.nav-toggle[aria-expanded="true"] span { background: var(--concrete); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--black);
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 6rem var(--gutter) 3rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.primary-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0s;
}
.primary-nav a {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 9vw, 4.5rem);
  text-transform: uppercase;
  color: var(--concrete);
  border-bottom: 1px solid rgba(214, 211, 204, 0.2);
  padding-block: 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.primary-nav a::before {
  content: attr(data-index);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--redline);
  flex-shrink: 0;
}
.primary-nav a:hover, .primary-nav a:focus-visible, .primary-nav a.is-active {
  color: var(--redline);
  padding-left: 1rem;
}
.primary-nav a:first-child { border-top: 1px solid rgba(214, 211, 204, 0.2); }

@media (min-width: 700px) and (max-width: 1023px) {
  .primary-nav { justify-content: center; padding-inline: 10vw; }
}

/* From 1024px, drop the overlay takeover for a persistent inline bar —
   the overlay's dramatic entrance isn't worth the extra click on desktop. */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .primary-nav {
    position: static;
    inset: auto;
    z-index: auto;
    background: transparent;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }
  .primary-nav a {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--black);
    border-bottom: none;
    border-left: 1px solid var(--line-strong);
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
  }
  .primary-nav a::before { font-size: 0.72rem; }
  .primary-nav a:hover, .primary-nav a:focus-visible, .primary-nav a.is-active {
    background: var(--black);
    color: var(--concrete);
    padding-left: 1rem;
  }
  .primary-nav a:first-child { border-top: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.page-hero { position: relative; }
.page-hero::before {
  content: "";
  position: absolute;
  top: -1rem;
  right: -1rem;
  width: 220px;
  height: 220px;
  z-index: -1;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Ccircle cx='100' cy='100' r='72' fill='none' stroke='%23D6321F' stroke-width='1.4'/%3E%3Ccircle cx='100' cy='100' r='40' fill='none' stroke='%23D6321F' stroke-width='1'/%3E%3Cline x1='100' y1='4' x2='100' y2='196' stroke='%23D6321F' stroke-width='1'/%3E%3Cline x1='4' y1='100' x2='196' y2='100' stroke='%23D6321F' stroke-width='1'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
@media (max-width: 767px) { .page-hero::before { width: 140px; height: 140px; } }

.page-hero { padding-bottom: 3rem; border-bottom: var(--border) solid var(--black); background: var(--paper); overflow: hidden; }
.page-hero .wrap { padding-block: 3rem; }
.page-hero .eyebrow { margin-bottom: 1rem; }
.page-hero h1 { font-size: var(--fs-h2); text-transform: uppercase; max-width: 20ch; }
.page-hero p { color: var(--grey-muted); max-width: 52ch; margin-top: 1rem; font-size: 1.05rem; }

.hero { padding-block: 0; }

.hero-photo-bleed {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-bottom: var(--border) solid var(--black);
}
@media (min-width: 640px) { .hero-photo-bleed { aspect-ratio: 16 / 11; } }
@media (min-width: 1100px) { .hero-photo-bleed { aspect-ratio: 21 / 9; } }
.hero-photo-bleed img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(15%) contrast(1.05); }
.hero-photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 18, 18, 0.9) 0%, rgba(18, 18, 18, 0.35) 40%, rgba(18, 18, 18, 0) 68%);
}
.hero-watermark {
  position: absolute;
  top: 1.5%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(0.9rem, 5vw, 6rem);
  line-height: 1;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(214, 211, 204, 0.22);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 420px) {
  /* Not enough vertical room next to the 3-line headline at this width — the
     real content wins over the decorative watermark. */
  .hero-watermark { display: none; }
}

.hero-photo-copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding-block: 1.75rem 2.25rem;
}
.hero-photo-copy .eyebrow { color: rgba(214, 211, 204, 0.85); }
.hero-title { font-size: var(--fs-hero); text-transform: uppercase; color: var(--concrete); }
.hero-title .accent { background: var(--redline); color: var(--concrete); padding-inline: 0.15em; }

.hero-foot { display: grid; gap: 1.75rem; align-items: start; padding-block: 2.5rem 3rem; }
@media (min-width: 900px) { .hero-foot { grid-template-columns: 1.3fr 1fr; } }
.hero-sub { font-size: 1.1rem; color: var(--grey-muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ==========================================================================
   Photo frames — real photography, hard border, no radius
   ========================================================================== */

.photo-frame {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: var(--border) solid var(--black);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(15%) contrast(1.05); }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding-block: 4.5rem; }
.section--paper { background: var(--paper); border-block: 1px solid var(--line); }

.section-head { max-width: 54ch; margin-bottom: 2.75rem; }
.section-head h2 { font-size: var(--fs-h2); margin-bottom: 0.75rem; }
.section-sub { color: var(--grey-muted); }

/* ==========================================================================
   Teaser grid — home page links out to interior pages
   ========================================================================== */

.teaser-grid { display: grid; gap: var(--border); background: var(--black); border: var(--border) solid var(--black); }
@media (min-width: 640px) { .teaser-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .teaser-grid { grid-template-columns: repeat(4, 1fr); } }

.teaser-card { background: var(--paper); padding: 1.75rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; transition: background 0.2s var(--ease); }
.teaser-card:hover { background: var(--concrete); }
.teaser-card__tag { font-family: var(--font-mono); font-size: 0.72rem; color: var(--redline-deep); text-transform: uppercase; letter-spacing: 0.06em; }
.teaser-card h3 { font-size: 1.15rem; text-transform: uppercase; }
.teaser-card p { color: var(--grey-muted); font-size: 0.92rem; flex: 1; }
.teaser-card__link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-bottom: 2px solid var(--redline);
  align-self: flex-start;
  padding-bottom: 0.1rem;
}
.teaser-card__link svg { width: 12px; height: 12px; transition: transform 0.25s var(--ease); }
.teaser-card:hover .teaser-card__link svg { transform: translateX(3px); }

/* ==========================================================================
   Selected work — full-width editorial index, alternating sides
   ========================================================================== */

.work-list { border-top: var(--border) solid var(--black); }

.work-row { border-bottom: var(--border) solid var(--black); }
.work-row__link {
  display: grid;
  grid-template-columns: 1fr;
  text-decoration: none;
  color: inherit;
}
@media (min-width: 768px) {
  .work-row__link { grid-template-columns: 70px 1fr 1fr; align-items: stretch; }
}

.work-row__index {
  order: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem 0.5rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--redline-deep);
  background: var(--paper);
}

.work-row__photo { order: 2; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper); }
.work-row--feature .work-row__photo { aspect-ratio: 16 / 9; }
.work-row__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(15%) contrast(1.05); transition: filter 0.4s var(--ease), transform 0.6s var(--ease); }
.work-row__link:hover .work-row__photo img {
  filter: grayscale(0%) contrast(1.05);
  transform: scale(1.03);
}

.work-row__info {
  order: 3;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 26px),
    var(--paper);
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
}
.work-row__info::before {
  content: attr(data-num);
  position: absolute;
  right: 0.5rem;
  bottom: -0.35em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 8rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(18, 18, 18, 0.1);
  pointer-events: none;
  z-index: 0;
}
.work-row__info > * { position: relative; z-index: 1; }
.work-row__info h3 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); text-transform: uppercase; }
.work-row__meta { font-family: var(--font-mono); font-size: 0.85rem; color: var(--grey-muted); }
.work-row__tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--concrete);
  background: var(--redline);
  padding: 0.2rem 0.55rem;
}

/* ==========================================================================
   Process — numbered, ruler-tick top border
   ========================================================================== */

.process-list { display: grid; gap: 0; border-top: var(--border) solid var(--black); }
@media (min-width: 900px) {
  .process-list { grid-template-columns: repeat(3, 1fr); }
  .process-step:not(:last-child) { border-right: 1px solid var(--line-strong); }
}
.process-step { padding: 2rem 1.5rem; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .process-step { border-bottom: none; } }

.process-step__number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--redline-deep);
  margin-bottom: 1.25rem;
}
.process-step h3 { font-size: 1.3rem; margin-bottom: 0.6rem; text-transform: uppercase; }
.process-step p { color: var(--grey-muted); max-width: 34ch; }

/* ==========================================================================
   Studio
   ========================================================================== */

.studio-grid { display: grid; gap: 0; border: var(--border) solid var(--black); }
@media (min-width: 768px) { .studio-grid { grid-template-columns: 1fr 420px; } }
.photo-frame--studio { aspect-ratio: 4 / 3; border: none; border-left: 0; }
@media (min-width: 768px) { .photo-frame--studio { border-left: var(--border) solid var(--black); } }
@media (max-width: 767px) { .photo-frame--studio { border-top: var(--border) solid var(--black); } }

.studio-copy { padding: 2.5rem; background: var(--paper); }
.studio-copy h2 { font-size: var(--fs-h2); margin-bottom: 1rem; text-transform: uppercase; }
.studio-copy p { color: var(--grey-muted); max-width: 48ch; margin-bottom: 1rem; }
.studio-copy p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Contact — bold typographic block, no photo
   ========================================================================== */

.contact-block {
  border: var(--border) solid var(--black);
  background: var(--paper);
  padding: 2.5rem;
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 900px) { .contact-block { grid-template-columns: 1.2fr 1fr; padding: 3.5rem; } }

.contact-info h2 { font-size: var(--fs-h2); margin-bottom: 1rem; text-transform: uppercase; }
.contact-lead { color: var(--grey-muted); max-width: 44ch; margin-bottom: 2rem; font-size: 1.05rem; }

.contact-details { display: grid; gap: 1.5rem; }
.contact-details dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-muted);
  margin-bottom: 0.3rem;
}
.contact-details dd { margin: 0; font-family: var(--font-display); font-weight: 700; }
.contact-details a { border-bottom: 2px solid var(--redline); color: var(--black); }
.contact-details a:hover { color: var(--redline-deep); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--black); color: rgba(214, 211, 204, 0.7); padding-top: 3.5rem; border-top: var(--border) solid var(--black); }
.footer-inner { display: grid; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(214, 211, 204, 0.16); }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 1.2fr 1fr 1fr; } }

.wordmark--footer { color: var(--concrete); font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; text-transform: uppercase; display: flex; flex-direction: column; gap: 0.3rem; }
.wordmark--footer span { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--redline); }
.footer-brand p { margin-top: 0.75rem; font-size: 0.9rem; }

.footer-nav { display: flex; flex-direction: column; gap: 0.75rem; font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; }
.footer-nav a:hover { color: var(--concrete); }

.footer-contact { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.85rem; }
.footer-contact a:hover { color: var(--concrete); }

.footer-bottom { padding-block: 1.5rem; font-size: 0.78rem; font-family: var(--font-mono); }

/* ==========================================================================
   Scroll reveal + ruler-style progress
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition-delay: 0s; } }

.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 6px;
  z-index: 60;
  background:
    repeating-linear-gradient(to right, var(--black) 0 1px, transparent 1px 12px),
    var(--concrete);
  border-bottom: 1px solid var(--black);
}
.scroll-progress__fill {
  height: 100%;
  background: var(--redline);
  transform: scaleX(0);
  transform-origin: left;
  width: 100%;
}
@media (prefers-reduced-motion: reduce) { .scroll-progress { display: none; } }
