/* ---- Lovelace Studio ---------------------------------------------------- */

@font-face {
  font-family: 'Playfair Display';
  src: url('../media/fonts/PlayfairDisplay-subset.woff2') format('woff2-variations'),
       url('../media/fonts/PlayfairDisplay-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --paper: #faf8f4;
  --paper-deep: #f1ede5;
  --ink: #232120;
  --ink-soft: #565250;
  --slate: #7d93a3;
  --slate-deep: #52687a;
  --gold: #b08d57;      /* decorative accents only — fails AA as text on paper */
  --gold-text: #7a5c2e; /* ≥4.5:1 on every site background */
  --line: #e3ddd2;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16.5px;
}

/* height:auto lets width/height attributes set the aspect ratio without
   fixing the rendered height when max-width scales the image down */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--slate-deep); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }

.wrap { max-width: 1150px; margin: 0 auto; padding: 0 22px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 54px; width: auto; }

.site-nav { display: flex; gap: 26px; flex-wrap: wrap; }

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }

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

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  border: 1.5px solid var(--ink);
  transition: background 0.2s, color 0.2s;
}

.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--slate-deep); border-color: var(--slate-deep); }
.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

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

.hero {
  background:
    radial-gradient(1100px 520px at 88% 12%, rgba(125, 147, 163, 0.28), transparent 62%),
    radial-gradient(900px 460px at 6% 92%, rgba(176, 141, 87, 0.22), transparent 60%),
    linear-gradient(155deg, #e5dcc0 0%, var(--paper) 52%, #d2dde5 100%);
  border-bottom: 1px solid var(--line);
}

.hero-logo { max-width: 380px; width: 78%; margin-bottom: 28px; }

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.hero h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); margin-bottom: 20px; }

.hero p.lede { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 30px; max-width: 34em; }

.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art { position: relative; }

.hero-art img {
  width: 100%;
  border: 10px solid #fff;
  box-shadow: 0 14px 40px rgba(35, 33, 32, 0.18);
  border-radius: 2px;
}

.hero-art figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: right;
  font-style: italic;
}

/* ---- Trust strip ---- */

.trust {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(176, 141, 87, 0.14), rgba(250, 248, 244, 0) 38%, rgba(250, 248, 244, 0) 62%, rgba(125, 147, 163, 0.17));
}

.trust ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 40px;
  padding: 16px 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.trust li::before { content: '✦'; color: var(--gold); margin-right: 9px; }

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

section.block {
  padding: 70px 0;
  background: var(--paper);
}

section.block.alt {
  background:
    radial-gradient(1000px 420px at 92% 0%, rgba(125, 147, 163, 0.15), transparent 58%),
    radial-gradient(800px 380px at 4% 100%, rgba(176, 141, 87, 0.12), transparent 58%),
    linear-gradient(170deg, #f1ebdb 0%, #e5dcc2 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head { text-align: center; max-width: 44em; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 12px; }
.section-head p { color: var(--ink-soft); }

.kicker {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 10px;
  font-family: var(--sans);
}

/* ---- Featured grid ---- */

.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feat-grid a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(35, 33, 32, 0.10);
}

.feat-grid img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  transition: transform 0.35s ease;
}

.feat-grid a:hover img { transform: scale(1.045); }

.feat-grid figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 14px 10px;
  color: #fff;
  font-size: 0.88rem;
  background: linear-gradient(transparent, rgba(20, 18, 17, 0.72));
}

.center-cta { text-align: center; margin-top: 40px; }

/* ---- Commission cards ---- */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card img { aspect-ratio: 4 / 3; object-fit: cover; }

.card .card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.card h3 { font-size: 1.25rem; }

.card p { font-size: 0.95rem; color: var(--ink-soft); flex: 1; }

.card .price { font-family: var(--serif); font-size: 1.05rem; color: var(--slate-deep); }

/* ---- How it works ---- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }

.step { text-align: center; padding: 0 10px; }

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  box-sizing: border-box;
  padding-bottom: 5px;
  line-height: 1;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold-text);
  font-family: var(--serif);
  font-size: 1.45rem;
  margin-bottom: 14px;
}

.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { font-size: 0.93rem; color: var(--ink-soft); }

/* ---- About ---- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}

.about-grid img {
  border: 10px solid #fff;
  box-shadow: 0 10px 30px rgba(35, 33, 32, 0.15);
  border-radius: 2px;
}

.about-grid h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; }
.about-grid p { margin-bottom: 14px; color: var(--ink-soft); }

/* ---- Contact ---- */

.contact-box { text-align: center; max-width: 40em; margin: 0 auto; }
.contact-box h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.contact-box p { color: var(--ink-soft); margin-bottom: 24px; }
.contact-box .btn { margin: 4px 6px; }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ece5d3 0%, #ddd3b9 100%);
  padding: 34px 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}


.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; }
.site-footer img { height: 38px; opacity: 0.9; }

/* ---- Gallery page ---- */

.page-head {
  background:
    radial-gradient(900px 380px at 85% 10%, rgba(125, 147, 163, 0.25), transparent 60%),
    radial-gradient(700px 320px at 8% 95%, rgba(176, 141, 87, 0.16), transparent 58%),
    linear-gradient(155deg, #e5dcc0 0%, var(--paper-deep) 55%, #d5dfe5 100%);
  border-bottom: 1px solid var(--line);
  padding: 44px 0 34px;
  text-align: center;
}
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 10px; }
.page-head p { color: var(--ink-soft); max-width: 42em; margin: 0 auto; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 26px 0 8px;
}

.filters button {
  font: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s;
}

.filters button:hover { border-color: var(--gold); color: var(--ink); }
.filters button.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.masonry { columns: 3 300px; column-gap: 18px; padding: 26px 0 70px; }

.masonry figure {
  break-inside: avoid;
  margin: 0 0 18px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 3px 14px rgba(35, 33, 32, 0.10);
  overflow: hidden;
  cursor: zoom-in;
  transition: box-shadow 0.2s;
}

.masonry figure:hover { box-shadow: 0 8px 26px rgba(35, 33, 32, 0.20); }

.masonry figcaption { padding: 10px 14px 13px; font-size: 0.88rem; color: var(--ink-soft); }
.masonry figcaption strong { display: block; color: var(--ink); font-weight: 600; }

/* ---- Lightbox ---- */

dialog.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(1100px, 94vw);
  width: auto;
  margin: auto; /* the global * reset zeroes the UA margin that centres <dialog> */
}

dialog.lightbox::backdrop { background: rgba(22, 20, 19, 0.88); }

.lb-inner { background: var(--paper); border-radius: 4px; overflow: hidden; }

.lb-inner img { max-height: 78vh; width: auto; max-width: 100%; margin: 0 auto; }

.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
}

.lb-bar .lb-title { font-size: 0.95rem; }
.lb-bar .lb-title strong { font-family: var(--serif); font-size: 1.05rem; display: block; }

.lb-controls { display: flex; gap: 8px; }

.lb-controls button {
  font: inherit;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.lb-controls button:hover { border-color: var(--gold); }

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

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 34px; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .steps { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 16px; }
}

@media (max-width: 520px) {
  .feat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .brand img { height: 36px; }
}
