/* QuietHorizonArt — shared base styles (Warm Artisan Studio) */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--color-bg);
  background-image: var(--texture-paper);
  background-size: 160px 160px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* height:auto keeps aspect ratio correct when width/height attributes are
   present on an <img> (needed for CLS) but the element is scaled down by
   max-width:100% -- without it, width shrinks but height stays at the
   attribute value, stretching the image. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}
h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1.06; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.35rem; }
em, .accent-italic { font-style: italic; color: var(--color-accent-soft); }
p { margin: 0 0 var(--space-2); }
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--color-accent-soft);
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--color-accent-soft);
  opacity: 0.6;
}
.eyebrow.on-dark { color: var(--color-clay); }
.eyebrow.on-dark::before { background: var(--color-clay); }
.eyebrow.center { justify-content: center; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 6px 16px rgba(43, 41, 33, 0.18);
}
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: currentColor;
  position: relative;
}
.btn-secondary:hover { background: rgba(47,47,47,0.06); }
.btn-block { display: block; width: 100%; text-align: center; }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 232, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--color-charcoal);
}
.brand-mark {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-studio-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.wordmark {
  font-family: var(--font-heading);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: 0.005em;
}
.wordmark span { color: var(--color-accent-soft); }
.brand-tagline {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
}
@media (max-width: 560px) { .brand-tagline { display: none; } }

.main-nav { display: flex; align-items: center; gap: var(--space-3); }
.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
}
.main-nav a { text-decoration: none; }
.main-nav a:hover { color: var(--color-accent-soft); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .main-nav ul { display: none; }
  .main-nav.open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--color-border);
    gap: var(--space-2);
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
  }
}

/* Sections */
section { padding: var(--space-5) 0; }
.section-alt { background: var(--color-bg-alt); }
.section-clay { background: linear-gradient(180deg, var(--color-bg-alt) 0%, #e4d4bf 100%); }
.section-head { max-width: 640px; margin-bottom: var(--space-4); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin-top: 0.4rem; }

/* Torn-paper divider between sections -- restrained, used only at a few
   deliberate transitions (see index.html), not applied globally. */
.deckle-top { position: relative; }
.deckle-top::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 14px;
  background: inherit;
  -webkit-mask-image: var(--edge-deckle);
  mask-image: var(--edge-deckle);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  transform: translateY(-100%);
}

/* Cards / grid */
.grid { display: grid; gap: var(--space-3); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.route-card {
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.route-card:hover { box-shadow: 0 18px 32px rgba(36, 28, 23, 0.14); transform: translateY(-3px); }
.route-card img { aspect-ratio: 4/3; object-fit: cover; }
.route-card .route-card-body { padding: var(--space-2) 0.2rem var(--space-3); }
.route-card .route-card-body h3 { margin-bottom: 0.35rem; }
.route-card .route-card-body p { margin-bottom: 0.6rem; color: var(--color-text-muted); font-size: 0.95rem; }
.route-card .route-card-cta { font-family: var(--font-ui); font-weight: 600; font-size: 0.88rem; color: var(--color-accent-soft); }

/* Editorial "choose your art" layout: one featured piece + a stacked list,
   replacing the four equal-width ecommerce tiles. */
.choice-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-4);
  align-items: start;
}
@media (max-width: 900px) { .choice-layout { grid-template-columns: 1fr; } }
.choice-featured img { aspect-ratio: 3/4; }
.choice-featured .route-card-body { padding-top: var(--space-3); }
.choice-featured h3 { font-size: 1.7rem; }
.choice-list { display: flex; flex-direction: column; gap: var(--space-3); }
.choice-list .route-card { display: grid; grid-template-columns: 128px 1fr; gap: var(--space-2); align-items: center; }
.choice-list .route-card img { aspect-ratio: 1/1; width: 128px; }
.choice-list .route-card .route-card-body { padding: 0.2rem 0.6rem 0.2rem 0; }
@media (max-width: 480px) { .choice-list .route-card { grid-template-columns: 88px 1fr; } .choice-list .route-card img { width: 88px; } }

/* Hero */
.hero { padding-top: var(--space-4); padding-bottom: var(--space-6); overflow: hidden; }
.hero-editorial {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  min-height: 74vh;
}
@media (max-width: 960px) { .hero-editorial { grid-template-columns: 1fr; min-height: auto; gap: var(--space-4); } }
.hero-copy { padding-right: var(--space-4); }
@media (max-width: 960px) { .hero-copy { padding-right: 0; } }
.hero-copy .eyebrow { margin-bottom: var(--space-2); }
.hero-copy h1 { margin-bottom: var(--space-3); }
.hero-copy p.lede { font-size: 1.2rem; color: var(--color-text-muted); max-width: 40ch; }
.hero-actions { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }
.hero-signoff {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* Full-bleed hero image with a deckled left edge, breaking out of the
   container so artwork dominates rather than sitting in a bordered box. */
.hero-image-bleed {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 640px;
  margin-right: calc((100vw - var(--content-max)) / -2 + var(--space-3));
}
@media (max-width: 1240px) { .hero-image-bleed { margin-right: calc(var(--space-3) * -1); } }
@media (max-width: 960px) { .hero-image-bleed { margin-right: 0; max-width: 100%; } }
.hero-image-bleed .frame {
  position: relative;
  border-radius: 2px 14px 14px 2px;
  overflow: hidden;
  box-shadow: 0 32px 60px -12px rgba(36, 28, 23, 0.35);
}
@media (max-width: 960px) { .hero-image-bleed .frame { border-radius: 6px; } }
.hero-image-bleed img { width: 100%; }
.hero-image-bleed .frame::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(245,241,232,0.35);
  pointer-events: none;
}
.hero-caption {
  margin-top: var(--space-2);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-align: right;
}
@media (max-width: 960px) { .hero-caption { text-align: left; } }

/* Generic editorial two-column split (premium band content, etc.) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: var(--space-4); } }

/* Process steps */
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
  counter-reset: step;
}
@media (max-width: 900px) { .process-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process-steps { grid-template-columns: 1fr; } }
.process-step { text-align: left; position: relative; padding-top: 0.2rem; }
.process-step + .process-step { border-top: none; }
.process-step .step-num {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.9rem;
  color: var(--color-accent-soft); /* raw clay measured 1.9-2.2:1 on parchment/beige, fails 3:1 large-text AA -- caught by pa11y */
  margin-bottom: 0.3rem;
  display: block;
}
.process-step h3 { font-family: var(--font-ui); font-size: 1rem; font-weight: 600; margin-bottom: 0.3rem; }
.process-step p { font-size: 0.92rem; color: var(--color-text-muted); }

/* Artist / studio presence section */
.artist-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-5);
  align-items: center;
}
@media (max-width: 900px) { .artist-section { grid-template-columns: 1fr; gap: var(--space-4); } }
.artist-portrait { position: relative; }
.artist-portrait .frame {
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 28px 50px -14px rgba(36, 28, 23, 0.3);
  -webkit-mask-image: var(--edge-deckle);
  mask-image: var(--edge-deckle);
  -webkit-mask-position: bottom;
  mask-position: bottom;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 14px, auto;
  mask-size: 100% 14px, auto;
  padding-bottom: 14px;
}
.artist-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.4;
  color: var(--color-text);
  margin: var(--space-2) 0 var(--space-3);
}
.artist-signature {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-accent-soft);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.artist-signature svg { flex: none; }
.artist-credentials {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}
.artist-credentials div { font-family: var(--font-ui); font-size: 0.82rem; color: var(--color-text-muted); max-width: 20ch; }
.artist-credentials strong { display: block; color: var(--color-text); font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; }

/* Before / after */
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.before-after figure { margin: 0; position: relative; border-radius: 2px; overflow: hidden; box-shadow: 0 18px 34px -10px rgba(36,28,23,0.22); }
.before-after img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.before-after figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.5rem 0.8rem; background: rgba(36, 28, 23, 0.62); color: #fff;
}

/* Asymmetric pet-portrait pair: one tall feature + two stacked smaller */
.pet-duo { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-2); }
@media (max-width: 640px) { .pet-duo { grid-template-columns: 1fr; } }
.pet-duo figure { margin: 0; }
.pet-duo img { border-radius: 2px; box-shadow: 0 18px 34px -12px rgba(36,28,23,0.22); }
.pet-duo-feature { height: 100%; }
.pet-duo-feature img { width: 100%; height: 100%; object-fit: cover; }
.pet-duo-stack { display: grid; gap: var(--space-2); }
.pet-duo-stack img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* Premium hand-painted band -- warm studio-dark, not flat ecommerce black */
.premium-band {
  background-color: var(--color-studio-dark);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% 0%, rgba(201,154,122,0.10), transparent 60%),
    var(--texture-paper);
  background-size: auto, 160px 160px;
  color: var(--color-parchment);
  position: relative;
}
.premium-band .eyebrow { color: var(--color-clay); }
.premium-band .eyebrow::before { background: var(--color-clay); }
.premium-band .btn-secondary { border-color: var(--color-parchment); color: var(--color-parchment); }
.premium-band .btn-secondary:hover { background: rgba(245,241,232,0.08); }
.premium-band .lede { color: rgba(245,241,232,0.78); max-width: 46ch; }
.premium-band blockquote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.45;
  margin: var(--space-3) 0;
  padding-left: var(--space-3);
  border-left: 2px solid var(--color-clay);
  color: rgba(245,241,232,0.92);
}
.premium-band .studio-details { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-3) 0; }
.premium-band .studio-details div { font-family: var(--font-ui); font-size: 0.85rem; color: rgba(245,241,232,0.7); }
.premium-band .studio-details strong { display: block; color: var(--color-parchment); font-family: var(--font-heading); font-size: 1rem; font-style: normal; margin-bottom: 0.15rem; }
.premium-band .frame {
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 30px 60px -14px rgba(0,0,0,0.5);
}

/* Gallery: curated portfolio, not ecommerce cards */
.gallery-masonry {
  columns: 3 260px;
  column-gap: var(--space-3);
}
@media (max-width: 720px) { .gallery-masonry { columns: 1; } }
.gallery-piece {
  break-inside: avoid;
  margin-bottom: var(--space-4);
}
.gallery-piece .frame {
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 18px 34px -12px rgba(36,28,23,0.22);
  margin-bottom: var(--space-2);
}
.gallery-piece .meta .title { font-family: var(--font-heading); font-style: italic; font-size: 1.1rem; }
.gallery-piece .meta .sub { font-family: var(--font-ui); font-size: 0.8rem; color: var(--color-text-muted); margin-top: 0.2rem; }
.status-tag {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
}
.status-tag.is-sold { color: var(--color-text-muted); }

/* Deprecated ecommerce gallery-card kept for any page still using it */
.gallery-card { background: #fff; border-radius: var(--radius-md); overflow: hidden; }
.gallery-card img { aspect-ratio: 1/1; object-fit: cover; }
.gallery-card .meta { padding: var(--space-2); }
.gallery-card .meta .title { font-family: var(--font-heading); font-size: 1.05rem; }
.gallery-card .meta .sub { font-family: var(--font-ui); font-size: 0.82rem; color: var(--color-text-muted); }
.badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-accent-soft);
}

/* IC cross-sell -- editorial continuation, not a promo widget */
.memory-narrative { max-width: 720px; }
.memory-narrative p { font-size: 1.1rem; }
.ic-continuation {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.ic-continuation p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  margin: 0;
  color: var(--color-text);
}
.ic-continuation a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* Deprecated boxed ic-card, kept in case any page still references it */
.ic-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
}
@media (max-width: 720px) { .ic-card { grid-template-columns: 1fr; text-align: center; } }
.ic-mark {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--color-charcoal); color: var(--color-parchment);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700;
}

/* Email capture — "From the Studio" */
.email-capture {
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 20px 40px -16px rgba(36,28,23,0.18);
  padding: var(--space-4);
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.email-form { display: flex; gap: 0.6rem; margin-top: var(--space-2); flex-wrap: wrap; justify-content: center; }
.email-form input[type="email"] {
  flex: 1 1 260px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.95rem;
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.consent-row input { margin-top: 0.2rem; }
.form-note { font-family: var(--font-ui); font-size: 0.78rem; color: var(--color-text-muted); margin-top: var(--space-1); }

/* Trust section */
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .trust-list { grid-template-columns: 1fr; } }
.trust-list li { font-family: var(--font-ui); font-size: 0.95rem; padding-left: 1.6rem; position: relative; }
.trust-list li::before { content: "—"; position: absolute; left: 0; color: var(--color-accent-soft); }

/* Footer */
.site-footer {
  background: var(--color-studio-dark);
  color: var(--color-parchment);
  padding: var(--space-5) 0 var(--space-3);
  font-family: var(--font-ui);
  font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-3); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid .col-label { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-clay); margin: 0 0 0.8rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-grid a { text-decoration: none; color: rgba(245,241,232,0.85); }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(245,241,232,0.14);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2);
  color: rgba(245,241,232,0.6);
  font-size: 0.8rem;
}

/* Utility */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-charcoal); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
