/* Ivan Sushko — aviation photography
   Quiet, photo-first layout: cool paper background, deep navy as the only accent.
   Bricolage Grotesque for headings, Figtree for text. */

:root {
  --bg: #f3f4f5;        /* page */
  --surface: #ffffff;   /* inputs, raised areas */
  --ink: #17212d;       /* text */
  --muted: #5f6b78;     /* secondary text */
  --line: #d6dae0;      /* rules */
  --navy: #1e3550;      /* accent: buttons, active nav, bands */
  --navy-deep: #15263a; /* footer */
  --on-navy: #e8edf3;   /* text on navy */
  --on-navy-muted: #a9b6c6;
  --tile: #dfe2e6;      /* image placeholders */

  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage Grotesque", "Figtree", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

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

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.2vw, 64px); }
h2 { font-size: clamp(26px, 2.8vw, 34px); }
h3 { font-size: 20px; line-height: 1.25; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.6; max-width: 36em; color: var(--ink); }
.meta { font-size: 14px; color: var(--muted); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center;
  font: 500 16px/1 var(--font);
  padding: 14px 22px;
  background: var(--navy); color: #fff;
  border: 1px solid var(--navy); border-radius: 2px;
  text-decoration: none; cursor: pointer;
  transition: background .2s ease;
}
.btn:hover { background: var(--navy-deep); }
.btn.light { background: #fff; color: var(--navy); border-color: #fff; }
.btn.light:hover { background: var(--on-navy); }
.btn[disabled] { opacity: .6; cursor: default; }
.text-link { font-weight: 500; text-decoration: none; color: var(--navy); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.text-link:hover { color: var(--ink); }

/* ---------- Header ---------- */
.site-head { position: relative; z-index: 10; color: var(--ink); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.015em; }
.nav-row { display: flex; align-items: center; gap: 30px; }
.menu { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.menu a { font-size: 15.5px; font-weight: 500; letter-spacing: .01em; text-decoration: none; padding: 6px 0; color: var(--muted); border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease; }
.menu a:hover { color: var(--ink); }
.menu a[aria-current="page"] { color: var(--ink); border-color: var(--navy); }
.social { display: flex; gap: 12px; padding-left: 26px; border-left: 1px solid var(--line); }
.social a { display: grid; place-items: center; width: 28px; height: 28px; color: var(--muted); }
.social a:hover { color: var(--ink); }
.social svg { width: 18px; height: 18px; }

/* On the home page the header sits on the photo, over a dark fade */
.site-head.on-photo { position: absolute; top: 0; left: 0; right: 0; color: #fff; }
.site-head.on-photo .menu a { color: rgba(255,255,255,.78); }
.site-head.on-photo .menu a:hover, .site-head.on-photo .menu a[aria-current="page"] { color: #fff; }
.site-head.on-photo .menu a[aria-current="page"] { border-color: #fff; }
.site-head.on-photo .social { border-color: rgba(255,255,255,.22); }
.site-head.on-photo .social a { color: rgba(255,255,255,.78); }
.site-head.on-photo .social a:hover { color: #fff; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.menu-toggle { display: none; }

/* Phones and small tablets: menu button opens a full-screen menu */
@media (max-width: 860px) {
  .head-inner { padding-top: 14px; padding-bottom: 14px; }
  .menu-toggle {
    display: grid; place-items: center; position: relative; z-index: 30;
    width: 44px; height: 44px; margin-right: -10px; padding: 0;
    background: none; border: 0; color: inherit; cursor: pointer;
  }
  .menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
    display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .3s ease, background-color .2s ease;
  }
  .menu-toggle .bars { position: relative; }
  .menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle .bars::before { top: -7px; }
  .menu-toggle .bars::after { top: 7px; }

  .nav-row {
    position: fixed; inset: 0; z-index: 20;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 40px;
    padding: 96px var(--gutter) 48px;
    background: var(--navy-deep); color: #fff;
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s;
  }
  .menu { flex-direction: column; gap: 6px; }
  .menu a, .site-head.on-photo .menu a {
    display: inline-block; font-family: var(--display); font-weight: 600; font-size: 34px; letter-spacing: -0.02em;
    padding: 4px 0; color: rgba(255,255,255,.62); border-bottom: 0;
  }
  .menu a[aria-current="page"], .site-head.on-photo .menu a[aria-current="page"] { color: #fff; }
  .menu a:hover { color: #fff; }
  .social, .site-head.on-photo .social { display: flex; gap: 22px; padding: 22px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.18); width: 100%; }
  .social a, .site-head.on-photo .social a { color: rgba(255,255,255,.8); width: 32px; height: 32px; }
  .social svg { width: 22px; height: 22px; }

  .site-head.open .nav-row { opacity: 1; visibility: visible; transition: opacity .25s ease; }
  .site-head.open .menu-toggle { color: #fff; }
  .site-head.open .menu-toggle .bars { background: transparent; }
  .site-head.open .menu-toggle .bars::before { transform: translateY(7px) rotate(45deg); }
  .site-head.open .menu-toggle .bars::after { transform: translateY(-7px) rotate(-45deg); }
  .site-head.open .brand { position: relative; z-index: 30; color: #fff; }
  .site-head.open .brand img { filter: brightness(0) invert(1); }
  body.menu-open { overflow: hidden; }
}

/* ---------- Home hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; color: #fff; background: #1d2a39; overflow: hidden; }
@supports (min-height: 100svh) { .hero { min-height: 100svh; } }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,14,22,.55) 0%, rgba(8,14,22,.22) 22%, rgba(8,14,22,.12) 45%, rgba(8,14,22,.3) 70%, rgba(8,14,22,.65) 100%); }
.hero-inner { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(24px, 4vh, 44px); }
.hero h1 { font-size: clamp(46px, 6.4vw, 92px); font-weight: 600; line-height: .95; letter-spacing: -0.035em; }
.hero p { font-size: clamp(17px, 1.5vw, 20px); max-width: 28em; margin: 12px 0 0; color: rgba(255,255,255,.92); }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-top: 18px; }
.hero-caption { font-size: 13px; color: rgba(255,255,255,.7); }

/* ---------- Sections ---------- */
.section { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }
.section + .section { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(28px, 4vw, 52px); }
.page-head .lede { margin-top: 16px; }

/* ---------- Selected work ---------- */
.selected { display: grid; gap: 8px; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(150px, 19vw, 250px); }
.selected a { position: relative; display: block; overflow: hidden; background: var(--tile); grid-column: span 2; }
.selected a:nth-child(1) { grid-column: span 4; grid-row: span 2; }
.selected a:nth-child(4), .selected a:nth-child(5) { grid-column: span 3; }
.selected img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.selected a:hover img { transform: scale(1.02); }
@media (max-width: 760px) {
  .selected { grid-template-columns: 1fr 1fr; grid-auto-rows: 36vw; gap: 6px; }
  .selected a, .selected a:nth-child(4), .selected a:nth-child(5) { grid-column: span 1; grid-row: span 1; }
  .selected a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
}

/* ---------- Articles ---------- */
.articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.article { text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
.thumb { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--tile); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb.noimg { background: var(--navy); display: flex; align-items: flex-end; padding: 14px 16px; }
.thumb.noimg::after { content: attr(data-outlet); font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--on-navy); }
.article h3 { margin-bottom: 6px; }
.article:hover h3, .article-list a:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (max-width: 900px) { .articles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .articles { grid-template-columns: 1fr; } }

.article-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.article-list li { border-bottom: 1px solid var(--line); }
.article-list a { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center; padding: 24px 0; text-decoration: none; }
.article-list h3 { font-size: 23px; margin: 4px 0 8px; }
.article-list p { margin: 0; color: var(--muted); max-width: 46em; }
@media (max-width: 640px) { .article-list a { grid-template-columns: 1fr; gap: 14px; } }

/* ---------- Covers ---------- */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 240px)); gap: 28px; }
.cover { margin: 0; }
.cover .page { position: relative; aspect-ratio: 3 / 4; background: var(--navy); overflow: hidden; box-shadow: 0 18px 32px -22px rgba(15,25,40,.55); }
.cover .page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .page.text { display: flex; flex-direction: column; justify-content: space-between; padding: 18px; color: var(--on-navy); }
.cover .page.text b { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1; }
.cover .page.text span { font-family: var(--display); font-weight: 500; font-size: 18px; line-height: 1.2; color: var(--on-navy-muted); }
.cover > a { text-decoration: none; display: block; }
.cover > a:hover figcaption { text-decoration: underline; text-underline-offset: 3px; }
.cover .page.has-img { background: transparent; box-shadow: none; aspect-ratio: auto; overflow: visible; }
.cover .page.has-img img { position: static; height: auto; mix-blend-mode: multiply; }
.cover figcaption { margin-top: 12px; font-size: 15px; line-height: 1.4; }
.cover figcaption .meta { display: block; }
@media (max-width: 520px) { .covers { grid-template-columns: 1fr 1fr; gap: 16px; } }

/* ---------- Portfolio ---------- */
.masonry { columns: 3 320px; column-gap: 8px; }
.masonry button { display: block; width: 100%; margin: 0 0 8px; padding: 0; border: 0; background: var(--tile); cursor: zoom-in; break-inside: avoid; }
.masonry img { width: 100%; }
.ig-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.ig-note { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 180px; padding: 24px; background: var(--tile); color: var(--muted); font-size: 15px; }
.ig-grid a { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--tile); display: block; }
.ig-grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .ig-grid { grid-template-columns: repeat(3, 1fr); } }

/* Instagram carousel: one strip drawn twice, sliding left forever; pauses on hover */
.ig-grid.ig-carousel { display: block; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%); }
.ig-track { display: flex; width: max-content; animation: ig-slide calc(var(--ig-count, 6) * 7s) linear infinite; }
.ig-carousel:hover .ig-track, .ig-carousel:focus-within .ig-track { animation-play-state: paused; }
.ig-track a { flex: 0 0 auto; width: clamp(200px, 22vw, 300px); margin-right: 10px; aspect-ratio: 4 / 5; }
.ig-track a img { transition: transform .5s ease; }
.ig-track a:hover img { transform: scale(1.03); }
@keyframes ig-slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ig-grid.ig-carousel { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .ig-track { animation: none; }
}

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10,16,24,.95); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 16px 24px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.lightbox figcaption { color: #c9d1da; font-size: 15px; margin-top: 14px; min-height: 1.4em; text-align: center; }
.lb-btn { position: fixed; background: none; border: 0; color: #fff; cursor: pointer; padding: 12px; }
.lb-btn svg { width: 28px; height: 28px; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ---------- Prints ---------- */
.prints { columns: 3 300px; column-gap: 28px; }
.print { display: inline-block; width: 100%; break-inside: avoid; margin-bottom: 32px; text-decoration: none; vertical-align: top; }
.print img { width: 100%; background: var(--tile); }
.print-title { display: block; margin-top: 12px; font-weight: 500; }
.print:hover .print-title { text-decoration: underline; text-underline-offset: 3px; }
.print-note { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; margin-bottom: 36px; color: var(--muted); font-size: 15px; }
.print-note p { margin: 0; max-width: 46em; }

/* ---------- Band ---------- */
.band { background: var(--navy); color: var(--on-navy); }
.band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; padding-top: clamp(52px, 7vw, 84px); padding-bottom: clamp(52px, 7vw, 84px); }
.band p { color: var(--on-navy-muted); margin: 10px 0 0; max-width: 34em; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.about .portrait { background: var(--tile); width: 100%; border-radius: 14px; }
.about .prose p { max-width: 34em; }
.about .prose .btn { margin-top: 12px; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
form .field { margin-bottom: 18px; }
label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 7px; }
label .opt { font-weight: 400; font-size: 14px; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid #c3c9d1; border-radius: 2px;
  padding: 12px 14px;
}
textarea { min-height: 170px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,53,80,.18); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; }
.form-status { margin-top: 16px; font-weight: 500; min-height: 1.6em; }
.form-status.ok { color: #24603a; }
.form-status.err { color: #9b2c1f; }
.aside-block { border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 32px; }
.aside-block h2 { font-size: 20px; margin-bottom: 10px; }
.aside-block ul { list-style: none; margin: 0; padding: 0; }
.aside-block li { margin: 6px 0; }

/* ---------- Footer ---------- */
.site-foot { background: var(--navy-deep); color: var(--on-navy-muted); font-size: 15px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.site-foot a { color: var(--on-navy); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
