/* Svalphotoart — shared styles */

:root {
  --ink: #2b2925;
  --ink-soft: #55524c;
  --cream: #faf7f2;
  --line: #e4ddd2;
  --accent: #a98a63;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: 3.4rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.15em; font-size: 1.1rem; }

p { margin: 0 0 1.2em; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.72rem;
  color: var(--accent);
}

/* ---------- Header / Nav ---------- */

header.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 28px 0;
}

header.site-header.solid {
  position: relative;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: block;
  line-height: 0;
}

.brand img {
  display: block;
  width: auto;
  height: 58px;
  transition: filter 0.3s ease;
}

.solid nav a { color: var(--ink); }
header.site-header:not(.solid) nav a { color: #fff; }

/* Logo art is black; invert it to white wherever it sits on a dark ground
   (the transparent header over the homepage hero, and the footer). */
header.site-header:not(.solid) .brand img { filter: brightness(0) invert(1); }

nav.main-nav {
  display: flex;
  gap: 34px;
  align-items: center;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

nav.main-nav a { position: relative; padding-bottom: 4px; }
nav.main-nav a:hover { opacity: 0.7; }

.has-dropdown { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: 28px;
  left: -20px;
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 14px 0;
  min-width: 220px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 8px 22px;
  color: var(--ink) !important;
  font-size: 0.78rem;
}
.dropdown a:hover { color: var(--accent) !important; }

/* Hamburger. Hidden on desktop; the 900px breakpoint below swaps it in and
   turns .main-nav into a drop-down panel. Three bars that fold into an X. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
/* Over the homepage hero the header is transparent, so the bars go white. */
header.site-header:not(.solid) .nav-toggle span { background: #fff; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 92vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: #fff;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 32px 70px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}
.hero h1 { color: #fff; margin-bottom: 0.2em; }
.hero .eyebrow { color: #f1e4d0; }

.page-hero {
  height: 46vh;
  min-height: 320px;
}

/* Art Sale placeholder heading, shown only while ART_SALE in build.py is
   still empty. Goes away on its own once the gallery has pictures in it.
   Sized with clamp so it stays big on a desktop without overflowing the
   640px .lede column on a phone. */
.coming-soon {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 0.4em;
}

/* Banner for a page that has no photograph chosen yet: a plain ink panel, so
   the heading still reads white and the layout matches every other page hero.
   Give the hero a background-image and this class can simply be dropped. */
.plain-hero {
  background: var(--ink);
  height: 34vh;
  min-height: 240px;
}

/* Investment banner: a collage, so nothing may be cropped off it. The image
   sits in the flow and sets the banner's height instead of being a cover
   background, and is capped so a wide monitor doesn't make it enormous. */
.art-hero {
  height: auto;
  min-height: 0;
  background: var(--cream);
  display: block;
}
/* Keep the darkening gradient on the picture itself, or it would grey out the
   cream margins either side of it. */
.art-hero::after {
  left: 50%;
  right: auto;
  width: 100%;
  max-width: 1600px;
  transform: translateX(-50%);
}
.art-hero-img {
  display: block;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}
.art-hero .hero-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

/* About page: portrait beside the bio, portrait given the wider column. */
.about-grid {
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-grid img {
  aspect-ratio: 3/4;
  object-fit: cover;
}

/* ---------- Sections ---------- */

section { padding: 110px 0; }
section.tight { padding: 70px 0; }
/* Homepage "Selected Work": sits closer under the hero than a normal section. */
section.lifted { padding-top: 55px; }
.center { text-align: center; }
.lede {
  max-width: 640px;
  margin: 0 auto 60px;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- Grid gallery ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid.two { grid-template-columns: repeat(2, 1fr); }
/* Homepage "Selected Work": more, smaller frames than a gallery page. */
.grid.small { grid-template-columns: repeat(4, 1fr); gap: 14px; }
/* Event Photography: more, smaller frames sitting close together, nearly a
   contact sheet. Needs its own entries in the breakpoints below, because
   `.grid.snug` outranks the plain `.grid` rules there. */
.grid.snug { grid-template-columns: repeat(4, 1fr); gap: 5px; }
.grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3/4;
}
.grid.wide img { aspect-ratio: 4/3; }

.gallery-block { margin-bottom: 90px; }
.gallery-block:last-child { margin-bottom: 0; }
.gallery-title { text-align: center; margin-bottom: 34px; }

/* ---------- Portfolio category cards ---------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.cat-card {
  position: relative;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.cat-card::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.28);
  transition: background 0.3s ease;
}
.cat-card:hover::after { background: rgba(0,0,0,0.42); }
.cat-card .label {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 30px;
}
.cat-card .label .eyebrow { color: #f1e4d0; }
.cat-card .label h3 { color: #fff; margin: 0; font-size: 1.5rem; text-transform: none; letter-spacing: 0.02em; font-family: var(--serif); }

/* ---------- Portfolio page ---------- */

.pf-intro {
  max-width: 860px;
  margin: 0 0 70px;
}
.pf-intro h1 { margin-bottom: 0.3em; }
.pf-intro p { color: var(--ink-soft); margin: 0; }

/* Three session types, side by side: image, title, description. */
.pf-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}
.pf-col img {
  aspect-ratio: 3/4;
  object-fit: cover;
  margin-bottom: 26px;
}
.pf-col h2 { font-size: 1.9rem; margin: 0 0 0.4em; }
.pf-col p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }
.pf-col:hover img { opacity: 0.88; }
.pf-col img { transition: opacity 0.3s ease; }

/* ---------- Testimonials ---------- */

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.testimonial blockquote {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.testimonial cite {
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
}
.review-note {
  margin-top: 10px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.review-note a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

/* ---------- Pricing ---------- */

.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.price-card {
  border: 1px solid var(--line);
  padding: 44px 34px;
  text-align: center;
}
.price-card .amount {
  font-family: var(--serif);
  font-size: 2.6rem;
  margin: 14px 0 22px;
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.price-card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.price-card li:last-child { border-bottom: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 15px 38px;
  border: 1px solid var(--ink);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  transition: all 0.25s ease;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn-light { border-color: #fff; color: #fff; }
.btn-light:hover { background: #fff; color: var(--ink); }

/* Row of hero call-to-action buttons; wraps rather than overflowing on phones. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Forms ---------- */

form.contact-form {
  max-width: 680px;
  margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { margin-bottom: 24px; }
.field label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.radio-group { display: flex; flex-wrap: wrap; gap: 18px 28px; }
.radio-group label { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--ink); }
.radio-group input { width: auto; }

/* Honeypot. Hidden from sight but not with display:none, which some bots
   detect and skip — they fill it in, and Web3Forms then drops the message. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Submit feedback. Empty and invisible until script.js puts text in it. */
.form-status {
  margin: 16px 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  min-height: 1.4em;
}
.form-status.is-error { color: #9c3b2e; }

form.contact-form button[disabled] { opacity: 0.5; cursor: default; }
form.contact-form button[disabled]:hover { background: none; color: var(--ink); }

/* Replaces the whole form once a message has gone through. */
.form-thanks {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 32px;
  text-align: center;
  border: 1px solid var(--line);
  background: #fff;
}
.form-thanks h2 { margin-top: 0; }
.form-thanks p { color: var(--ink-soft); margin-bottom: 0; }

.form-alt {
  max-width: 680px;
  margin: 32px auto 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.form-alt a { border-bottom: 1px solid var(--accent); }

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--ink);
  color: #d9d4c9;
  padding: 60px 0 30px;
  text-align: center;
}
footer.site-footer .brand { display: inline-block; margin-bottom: 14px; }
footer.site-footer .brand img { height: 54px; filter: brightness(0) invert(1); }
footer.site-footer .social { margin-bottom: 20px; }
footer.site-footer .social a { display: inline-block; margin: 0 6px; }
/* Watercolour icons: the artwork carries its own colour, so no filter here. */
footer.site-footer .social img {
  display: block;
  height: 46px;
  width: auto;
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
footer.site-footer .social a:hover img { opacity: 1; transform: translateY(-2px); }
footer.site-footer .copyright { font-size: 0.75rem; color: #8f8b80; line-height: 1.9; }
footer.site-footer .copyright a { color: #8f8b80; text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  /* Nav becomes a panel under the header bar, opened by the hamburger.
     It hangs off header.site-header, which is positioned in both its states
     (absolute over the homepage hero, relative everywhere else). */
  .nav-toggle { display: flex; }
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0;
    background: var(--cream);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(0,0,0,0.10);
  }
  nav.main-nav.is-open { display: flex; }
  /* The panel is cream even when the header above it is transparent, so the
     white-link rule for the homepage hero has to be overridden here. */
  header.site-header nav.main-nav a,
  header.site-header:not(.solid) nav.main-nav a {
    display: block;
    padding: 13px 24px;
    color: var(--ink);
  }
  /* No hover on a touch screen, so the Portfolio dropdown is flattened into
     the list as indented children rather than staying a hover menu. */
  .has-dropdown { position: static; }
  .dropdown {
    display: block;
    position: static;
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  /* Needs nav.main-nav in the selector too, or the link rule above outranks
     it and the children lose their indent. */
  header.site-header nav.main-nav .dropdown a,
  header.site-header:not(.solid) nav.main-nav .dropdown a {
    padding: 11px 24px 11px 44px;
    font-size: 0.74rem;
    opacity: 0.72;
  }
  h1 { font-size: 2.4rem; }
  .grid, .grid.two, .grid.small, .testimonials, .pricing { grid-template-columns: 1fr 1fr; }
  /* Snug frames are small to begin with — three still fit on a tablet. */
  .grid.snug { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  /* Side-by-side portrait and bio get too narrow to read — stack them. */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }

  /* Portfolio: three columns get too narrow side by side — stack them. */
  .pf-columns { grid-template-columns: 1fr; gap: 56px; }
}
@media (max-width: 600px) {
  .grid, .grid.two, .testimonials, .pricing, .cat-grid { grid-template-columns: 1fr; }
  /* Two small frames still read fine at phone width — keep the pairing. */
  .grid.small, .grid.snug { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 2rem; }
  section { padding: 70px 0; }
  .brand img { height: 36px; }
  footer.site-footer .brand img { height: 44px; }
}
