/* =====================================================================
   jpsalonen.com — main stylesheet
   ---------------------------------------------------------------------
   Colours and fonts are set once in :root below. Change them there and
   the whole site follows.
   ===================================================================== */

:root {
  --deep-water: #0d2c33;   /* main brand colour: buttons, footer, links */
  --fjord: #1a7f96;        /* link hover */
  --ice-mist: #e8f4f7;     /* small labels on dark backgrounds */
  --mist: #ecf0f1;         /* light grey section background */
  --ink: #111111;          /* body text */
  --ink-soft: rgba(0, 0, 0, .66);
  --ink-faint: rgba(0, 0, 0, .45);
  --line: rgba(0, 0, 0, .14);

  --font-display: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  --page-pad: clamp(20px, 3.5vw, 48px);  /* left/right page margin */
  --section-gap: clamp(64px, 8vw, 110px); /* space between sections */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.8; }
img { display: block; max-width: 100%; }
a { color: var(--deep-water); text-decoration: none; }
a:hover { color: var(--fjord); }
h1, h2, h3, p { margin: 0; }

/* ---------- Text styles ---------- */
.eyebrow { font: 400 11px/1.4 var(--font-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-faint); }
.h1 { font: 700 clamp(44px, 6.2vw, 100px)/.98 var(--font-display); letter-spacing: -.045em; text-wrap: balance; }
.h2 { font: 700 clamp(34px, 3.6vw, 56px)/1.04 var(--font-display); letter-spacing: -.04em; text-wrap: balance; }
.h3 { font: 600 clamp(22px, 1.8vw, 27px)/1.15 var(--font-display); letter-spacing: -.025em; }
.lead { font-size: clamp(20px, 1.8vw, 28px); line-height: 1.5; text-wrap: pretty; }
.muted { color: var(--ink-soft); }
.quote { border-left: 1px solid var(--deep-water); padding-left: 22px; }
.link-arrow { font-weight: 600; font-size: 15px; color: var(--ink); border-bottom: 1px solid var(--deep-water); padding-bottom: 3px; align-self: flex-start; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; font: 600 15px/1 var(--font-body); letter-spacing: .02em; padding: 18px 32px; border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s; }
.btn--solid { background: var(--deep-water); color: #fff; }
.btn--solid:hover { background: var(--fjord); color: #fff; }
.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn--ghost:hover { background: #fff; color: var(--ink); }

/* ---------- Header & navigation ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 96px; padding: 0 var(--page-pad); }
.logo { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1.5px solid rgba(255, 255, 255, .9); font: 700 15px/1 var(--font-display); color: #fff; }
.logo:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.nav { display: flex; align-items: center; gap: 36px; }
.nav__label { font: 400 11px var(--font-mono); letter-spacing: .2em; color: var(--ice-mist); }
.nav__link { font: 500 14px var(--font-body); color: rgba(255, 255, 255, .86); background: none; border: 0; padding: 0; cursor: pointer; }
.nav__link:hover, .nav__link.is-current { color: #fff; }
.nav__link.is-current { border-bottom: 1px solid var(--ice-mist); padding-bottom: 2px; }
.nav__cta { font: 600 13px var(--font-body); letter-spacing: .02em; color: #fff; border: 1px solid rgba(255, 255, 255, .6); padding: 12px 26px; }
.nav__cta:hover { color: var(--ink); background: #fff; }

/* Services dropdown */
.dropdown { position: relative; }
.dropdown__toggle::after { content: "▾"; font-size: 11px; margin-left: 6px; opacity: .7; }
.dropdown__menu { position: absolute; top: 34px; left: -20px; min-width: 220px; background: #fff; border: 1px solid var(--line); padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .18s, visibility 0s linear .4s; }
.dropdown__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; } /* hover bridge */
.dropdown__menu a { display: block; padding: 11px 20px; font: 500 14px var(--font-body); color: var(--ink); }
.dropdown__menu a:hover { background: var(--mist); }
.dropdown:hover .dropdown__menu, .dropdown.is-open .dropdown__menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

/* Mobile menu button (hidden on desktop) */
.menu-btn { display: none; width: 44px; height: 44px; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: #fff; margin: 6px 0; transition: transform .2s, opacity .2s; }

/* ---------- Hero (big photo at the top of every page) ---------- */
.hero { position: relative; min-height: 620px; height: 100vh; max-height: 940px; color: #fff; overflow: hidden; display: flex; }
.hero--short { max-height: 640px; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.7) 0%, rgba(0,0,0,.56) 45%, rgba(0,0,0,.8) 100%), radial-gradient(ellipse at center, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 60%); }
.hero__content { position: relative; margin: auto; padding: 120px var(--page-pad) 60px; max-width: 1240px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px; }
.hero__content .eyebrow { color: var(--ice-mist); letter-spacing: .28em; }
.hero__text { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.75; color: rgba(255, 255, 255, .82); max-width: 760px; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding-top: 8px; }

/* ---------- Generic section layouts ---------- */
/* .wrap = content column, about 70% of a large screen, centered.
   Change 70vw to make every narrowed section wider or narrower. */
.wrap { width: 100%; max-width: max(70vw, 1180px); margin-left: auto; margin-right: auto; }
.section { padding: var(--section-gap) var(--page-pad); }
.section--tight-top { padding-top: 0; }
.section--grey { background: var(--mist); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.center { text-align: center; align-items: center; }

/* ---------- Photo galleries ----------
   Photos are laid out in full-width rows without cropping.
   js/main.js calculates the rows; the row height is set per gallery
   with data-row-height="..." in the HTML. */
.gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-row { display: contents; } /* rows are a writing aid; JS sizes the photos */
.gallery--full { margin: 0; }       /* edge-to-edge gallery (service pages) */
.gallery img { height: 300px; width: auto; flex: none; object-fit: cover; background: var(--mist); user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.gallery[hidden] { display: none; }

/* Homepage filter buttons */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding-top: 8px; }
.filter { font: 400 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; padding: 9px 18px; background: transparent; color: rgba(0,0,0,.6); border: 1px solid rgba(0,0,0,.2); cursor: pointer; }
.filter:hover { border-color: var(--deep-water); color: var(--ink); }
.filter.is-active { background: var(--deep-water); border-color: var(--deep-water); color: #fff; }

/* ---------- Homepage: about ---------- */
.about { display: grid; grid-template-columns: minmax(260px, 420px) 1fr 1fr; gap: clamp(32px, 4vw, 64px); align-items: stretch; }  /* third column left empty on purpose */
.about__photo { width: 100%; height: 100%; min-height: 520px; object-fit: cover; }
.about .lead { font-size: clamp(19px, 1.5vw, 23px); line-height: 1.6; }

/* ---------- Homepage: service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: rgba(0,0,0,.12); }
.card { background: #fff; display: flex; flex-direction: column; gap: 14px; padding-bottom: 30px; }
.card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.card > :not(img) { margin: 0 30px; }
.card p { font-size: 15px; line-height: 1.7; color: rgba(0,0,0,.62); flex: 1; }
.card .link-arrow { font-size: 14px; color: var(--deep-water); }

/* ---------- Homepage: references ---------- */
.ref-box { border: 1px solid rgba(0,0,0,.16); padding: clamp(28px, 4vw, 64px); max-width: none; }
.ref-box p { max-width: 760px; }
.logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 48px 40px; padding-top: 64px; align-items: center; justify-items: center; }
.logos img { max-width: 100%; height: auto; } /* each logo's width is set in the HTML */

/* ---------- Photo strip (6 photos in a row) ---------- */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.strip img { width: 100%; height: 270px; object-fit: cover; }

/* ---------- Studio block (Behind the Camera) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.split__text { padding: var(--section-gap) clamp(32px, 4vw, 64px) var(--section-gap) var(--page-pad); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.split__img { width: 100%; height: 100%; min-height: 520px; object-fit: cover; }
.split--wrap .split__text { padding: 0 clamp(32px, 4vw, 64px) 0 0; }

/* ---------- Contact: service choices ---------- */
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: rgba(0,0,0,.12); }
.door { background: #fff; padding: 28px 30px 30px; display: flex; flex-direction: column; gap: 12px; }
.door__n { font: 400 10px var(--font-mono); letter-spacing: .18em; color: var(--deep-water); }
.door p { font-size: 14px; line-height: 1.65; color: rgba(0,0,0,.6); flex: 1; }
.door .link-arrow { font-size: 13px; color: var(--deep-water); }
.details { display: flex; flex-direction: column; gap: 2px; background: rgba(0,0,0,.12); max-width: 480px; }
.details div { background: #fff; padding: 16px 0; display: flex; flex-direction: column; gap: 4px; }
.details span { font: 400 10px var(--font-mono); letter-spacing: .16em; color: var(--ink-faint); }
.details strong { font-weight: 500; font-size: 17px; }
.social-links { display: flex; gap: 24px; font-weight: 600; font-size: 14px; }
.social-links a { border-bottom: 1px solid var(--deep-water); padding-bottom: 2px; }

/* ---------- Enquiry forms ---------- */
.enquiry { display: grid; grid-template-columns: 1fr minmax(0, 660px); gap: clamp(40px, 5.5vw, 88px); align-items: start; }
.enquiry__contact { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-soft); }
.form { border: 1px solid var(--line); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 20px; }
.form__title { font: 400 10px var(--font-mono); letter-spacing: .16em; color: rgba(0,0,0,.5); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; }
.field input, .field select, .field textarea { font: 400 15px var(--font-body); color: var(--ink); padding: 12px 14px; border: 1px solid rgba(0,0,0,.25); border-radius: 0; background: #fff; width: 100%; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--fjord); outline-offset: -1px; border-color: var(--fjord); }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 8px; }
.botcheck { display: none; }            /* spam trap for robots, keep hidden */
.form__status { font-size: 14px; color: var(--deep-water); min-height: 1em; margin: 0; }
.form__status:empty { display: none; }
.form__note { font-size: 12px; line-height: 1.5; color: rgba(0,0,0,.5); max-width: 300px; }

/* ---------- Closing call to action ---------- */
.cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px; }
.cta p { max-width: 600px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep-water); color: #fff; padding: 80px var(--page-pad) 40px; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 64px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.18); }
.footer__about { display: flex; flex-direction: column; gap: 18px; }
.footer__about p { font-size: 15px; line-height: 1.75; color: rgba(255,255,255,.7); max-width: 340px; }
.footer__col { display: flex; flex-direction: column; gap: 14px; font-size: 14px; line-height: 1.5; }
.footer__col h3 { font: 400 10px var(--font-mono); letter-spacing: .18em; color: var(--ice-mist); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 26px; font-size: 12px; color: rgba(255,255,255,.55); }
.footer__bottom nav { display: flex; gap: 24px; }

/* =====================================================================
   Tablet (under 1024px wide)
   ===================================================================== */
@media (max-width: 1024px) {
  .about { grid-template-columns: minmax(240px, 360px) 1fr; }
  .about__photo { min-height: 420px; }
  .cards, .doors { grid-template-columns: 1fr 1fr; }
  .logos { grid-template-columns: repeat(4, 1fr); }
  .strip { grid-template-columns: repeat(3, 1fr); }
  .enquiry { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
}

/* =====================================================================
   Mobile (under 760px wide)
   ===================================================================== */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-header { height: 76px; }
  .menu-btn { display: block; position: relative; z-index: 2; }
  .nav { position: fixed; inset: 0; z-index: 1; flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px; padding: 96px var(--page-pad) 40px; background: var(--deep-water); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s linear .2s; }
  .site-header.nav-open .nav { opacity: 1; visibility: visible; transition-delay: 0s; }
  .site-header.nav-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .site-header.nav-open .menu-btn span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav__label { display: none; }
  .nav__link { font-size: 24px; font-family: var(--font-display); font-weight: 600; }
  .dropdown__toggle::after { display: none; }
  .dropdown__menu { position: static; opacity: 1; visibility: inherit; transform: none; background: none; border: 0; padding: 12px 0 0 2px; min-width: 0; }
  .dropdown__menu::before { display: none; }
  .dropdown:hover .dropdown__menu, .dropdown.is-open .dropdown__menu { visibility: inherit; }
  .dropdown__menu a { color: rgba(255,255,255,.8); padding: 6px 0; font-size: 17px; }
  .dropdown__menu a:hover { background: none; color: #fff; }
  .nav__cta { margin-top: 10px; }

  .hero { height: auto; min-height: 88vh; }
  .two-col, .about, .split, .form__row { grid-template-columns: 1fr; }
  .about__photo { grid-row: auto; min-height: 0; aspect-ratio: 1; }
  .cards, .doors { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, 1fr); gap: 20px 28px; }
  .logos img { max-width: 80%; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip img { height: 180px; }
  .split__img { min-height: 320px; }
  .split--wrap .split__text { padding: 0 0 32px; }
  .gallery { gap: 6px; }
  .footer__top { grid-template-columns: 1fr; gap: 36px; }
}
