/* =====================================================================
   ansaffashraff.com / youknowans.com — portfolio styles
   Direction: "Field Notes" — dark, cinematic, expedition-log framing.
   Palette derived from the photographs themselves.
   ===================================================================== */

/* ---------- self-hosted fonts ----------
   To change fonts: drop new files in css/fonts/, update the @font-face
   src below, then change --font-display / --font-body in :root.        */
@font-face {
  font-family: "1971";
  src: url("fonts/1971.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Walkway Black";
  src: url("fonts/walkway-black.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* colours pulled from the work */
  --ground:    #0B0D0E;   /* near-black cave shadow */
  --ground-2:  #14171A;   /* raised surfaces */
  --rock:      #B87333;   /* warm copper rock */
  --rock-dim:  #8A6240;   /* muted rock */
  --ice:       #5FB4C4;   /* cold ice highlight */
  --paper:     #E8E4DC;   /* warm off-white text */
  --paper-dim: #9AA0A2;   /* secondary text */
  --line:      #2A2F33;   /* hairlines */

  --maxw: 1320px;
  --gap: 14px;

  /* --- THE TWO FONT KNOBS ---
     --font-name   = your name in the masthead (1971)
     --font-body   = everything else (Walkway Black)                  */
  --font-name: "1971", Impact, sans-serif;
  --font-body: "Walkway Black", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ground);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(120% 80% at 50% -10%, #16191C 0%, var(--ground) 60%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

/* ---------- top nav ---------- */
.topbar {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 30px 24px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  font-family: var(--font-name);
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.9;
  color: var(--paper);
  text-decoration: none;
}
.brand .dot { color: var(--ice); }

.nav {
  display: flex;
  gap: 22px;
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav a {
  color: var(--paper-dim);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--paper); }
.nav a.is-current { color: var(--paper); border-bottom-color: var(--ice); }

.topbar-rule {
  max-width: var(--maxw);
  width: 100%;
  margin: 18px auto 0;
  padding: 0 24px;
}
.topbar-rule hr { border: none; border-top: 1px solid var(--line); }

/* ---------- page intro (for inner pages) ---------- */
.page-head {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 46px 24px 10px;
}
.page-head h1 {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper);
}
.page-head .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.page-head .eyebrow::before {
  content: ""; width: 30px; height: 1px; background: var(--rock);
}

/* ---------- grid (portfolio) ---------- */
.grid {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 30px 24px 80px;
  column-count: 3;
  column-gap: var(--gap);
}
@media (max-width: 900px) { .grid { column-count: 2; } }
@media (max-width: 560px) { .grid { column-count: 1; } }

.tile {
  position: relative;
  break-inside: avoid;
  margin-bottom: var(--gap);
  cursor: pointer;
  overflow: hidden;
  background: var(--ground-2);
  outline: none;
}
.tile img {
  display: block; width: 100%; height: auto;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s;
  filter: saturate(0.96);
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); filter: saturate(1.08); }
.tile:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }

.tile-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 28px 14px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.03em;
  background: linear-gradient(to top, rgba(7,9,10,0.92), transparent);
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}
.tile:hover .tile-cap, .tile:focus-visible .tile-cap { opacity: 1; transform: translateY(0); }
.tile-cap .frame { color: var(--ice); }
.tile-cap .place { color: var(--paper-dim); text-align: right; }

/* ---------- prose (about / blog articles) ---------- */
.prose {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 80px;
}
.prose p, .prose li {
  font-family: var(--font-body);
  font-size: 1.08rem;
  color: var(--paper);
  margin-bottom: 1.1em;
  letter-spacing: 0.01em;
}
.prose h2 {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.4rem;
  margin: 1.8em 0 0.6em;
  color: var(--paper);
}
.prose a { color: var(--ice); text-decoration: underline; text-underline-offset: 3px; }
.prose .lead { font-size: 1.25rem; color: var(--paper-dim); margin-bottom: 1.6em; }
.prose img { width: 100%; height: auto; margin: 1.6em 0; }

/* ---------- blog index ---------- */
.post-list {
  max-width: 760px; width: 100%; margin: 0 auto;
  padding: 20px 24px 80px;
  list-style: none;
}
.post-list li { border-top: 1px solid var(--line); }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list a {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
  padding: 22px 0; text-decoration: none;
  transition: padding-left .25s;
}
.post-list a:hover { padding-left: 10px; }
.post-list .post-date {
  font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--ice); letter-spacing: 0.06em; min-width: 110px;
}
.post-list .post-title {
  font-family: var(--font-body); font-size: 1.25rem;
  text-transform: uppercase; letter-spacing: 0.02em; color: var(--paper);
}
.post-list .post-blurb { flex-basis: 100%; color: var(--paper-dim); font-size: 0.98rem; }

/* ---------- work-with-me form ---------- */
.form-wrap { max-width: 640px; width: 100%; margin: 0 auto; padding: 20px 24px 80px; }
.field { margin-bottom: 22px; }
.field label {
  display: block; margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 0.74rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ice);
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--ground-2);
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  transition: border-color .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--ice);
}
.btn {
  display: inline-block;
  background: var(--ice);
  color: var(--ground);
  border: none;
  font-family: var(--font-body);
  font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 13px 28px; cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn:hover { background: #7FCBDA; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

/* ---------- footer + corner socials ---------- */
.site-foot {
  max-width: var(--maxw);
  width: 100%;
  margin: auto auto 0;
  padding: 22px 24px;
  border-top: 1px solid var(--line);
  color: var(--paper-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.04em;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
}
.socials { display: flex; gap: 16px; align-items: center; }
.socials a {
  color: var(--paper-dim); display: inline-flex;
  transition: color .2s, transform .2s;
}
.socials a:hover { color: var(--ice); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; display: block; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(6,7,8,0.96); padding: 24px;
}
.lightbox.is-open { display: flex; }
.lb-stage {
  position: relative; max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
#lb-img {
  max-width: min(92vw, 1200px); max-height: 82vh;
  width: auto; height: auto; object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.lb-meta { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; }
.lb-meta #lb-frame { color: var(--ice); }
.lb-meta #lb-place { color: var(--paper-dim); }
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(20,23,26,0.7); border: 1px solid var(--line);
  color: var(--paper); font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.lb-btn:hover { background: var(--rock-dim); border-color: var(--rock); }
.lb-btn:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
#lb-prev { left: -8px; } #lb-next { right: -8px; }
#lb-close { position: absolute; top: -8px; right: -8px; width: 42px; height: 42px; font-size: 1.1rem; }
@media (max-width: 640px) {
  #lb-prev { left: 0; } #lb-next { right: 0; } #lb-close { top: 0; right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto; }
}

/* =====================================================================
   LANDING PAGE (index.html) — hero + scroll-story sections
   ===================================================================== */

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(0.98) brightness(0.9);
}
.hero::after { /* darken toward the bottom so text sits comfortably */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,13,14,0.95) 0%, rgba(11,13,14,0.25) 45%, rgba(11,13,14,0.15) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.hero-title {
  font-family: var(--font-name);
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.95;
  color: var(--paper);
}
.hero-title .dot { color: var(--ice); }
.hero-sub {
  margin-top: 14px;
  display: flex; align-items: center; gap: 14px;
  color: var(--paper-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.hero-sub::before { content: ""; width: 34px; height: 1px; background: var(--rock); }

/* scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--paper-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none;
}
.scroll-cue::after {
  content: "";
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, var(--ice), transparent);
  animation: cue-drop 1.8s ease-in-out infinite;
}
@keyframes cue-drop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

/* ---------- story sections ---------- */
.story {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 90px 24px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  align-items: center;
  border-top: 1px solid var(--line);
}
.story:first-of-type { border-top: none; }
.story.is-flipped { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.story.is-flipped .story-text { order: 2; }
.story.is-flipped .story-media { order: 1; }
@media (max-width: 820px) {
  .story, .story.is-flipped { grid-template-columns: 1fr; padding: 64px 24px; }
  .story.is-flipped .story-text { order: 1; }
  .story.is-flipped .story-media { order: 2; }
}

.story-kicker {
  display: flex; align-items: center; gap: 12px;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 16px;
}
.story-kicker::before { content: ""; width: 26px; height: 1px; background: var(--rock); }
.story-text h2 {
  font-family: var(--font-body);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: 0.02em; text-transform: uppercase;
  margin-bottom: 14px;
}
.story-text p {
  color: var(--paper-dim);
  font-size: 1.05rem;
  margin-bottom: 22px;
  max-width: 46ch;
}
.story-link {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--ice);
  transition: gap .25s, color .25s;
}
.story-link:hover { gap: 16px; color: var(--ice); }
.story-link .arrow { color: var(--ice); }

/* media side: single image or a small duo */
.story-media { display: grid; gap: var(--gap); }
.story-media.is-duo { grid-template-columns: 1fr 1fr; align-items: start; }
.story-media img {
  width: 100%; height: auto; display: block;
  background: var(--ground-2);
  filter: saturate(0.97);
}
.story-media.is-duo img:nth-child(2) { margin-top: 42px; } /* slight stagger */
@media (max-width: 820px) {
  .story-media.is-duo img:nth-child(2) { margin-top: 0; }
}

/* ---------- reveal animation ----------
   Elements with .reveal start hidden; js/reveal.js adds .is-visible
   when they scroll into view. Reduced-motion users skip the animation. */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .12s; }
.reveal-delay-2 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
