/* C. J. Hull — site styles
   Design: "Watercolour Paper" (warm paper, soft wash behind the name, mounted-print frames). */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face{font-family:Lora;font-weight:400;font-style:normal;font-display:swap;src:url(../fonts/lora-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:Lora;font-weight:400;font-style:italic;font-display:swap;src:url(../fonts/lora-latin-400-italic.woff2) format("woff2")}
@font-face{font-family:Lora;font-weight:500;font-style:normal;font-display:swap;src:url(../fonts/lora-latin-500-normal.woff2) format("woff2")}
/* Handwriting for painting titles. Only the face named in --hand is downloaded. */
@font-face{font-family:Caveat;font-weight:400;font-style:normal;font-display:swap;src:url(../fonts/caveat-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Nothing You Could Do";font-weight:400;font-style:normal;font-display:swap;src:url(../fonts/nothing-you-could-do-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:Inter;font-weight:400;font-style:normal;font-display:swap;src:url(../fonts/inter-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:Inter;font-weight:500;font-style:normal;font-display:swap;src:url(../fonts/inter-latin-500-normal.woff2) format("woff2")}

/* ---------- Tokens ---------- */
:root{
  --paper:#f5f0e6;
  --paper-deep:#ece5d6;
  --ink:#2f3a45;          /* slate accent */
  --text:#33302b;
  --muted:#5e5a52;
  --faint:#6f6a60;
  --rule:#d8cfbf;
  --frame:#fff;
  --shadow:0 1px 2px rgba(60,50,30,.10),0 8px 24px rgba(60,50,30,.08);
  --shadow-hover:0 2px 4px rgba(60,50,30,.12),0 14px 34px rgba(60,50,30,.12);
  --wash-blue:#9fb4c7;
  --wash-ochre:#c9b79a;
  --wash-mauve:#b8a7b8;
  --serif:Lora,Georgia,"Times New Roman",serif;
  /* Painting titles in a pencil hand. Fallback option: Caveat with --hand-size:23px */
  --hand:"Nothing You Could Do","Segoe Print","Bradley Hand",cursive;
  --hand-size:17px;
  --sans:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --gutter:clamp(16px,4vw,60px);
  --maxw:1320px;
}

/* ---------- Base ---------- */
*,*::before,*::after{box-sizing:border-box}
*{margin:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--sans);font-size:15px;line-height:1.6;
  background:var(--paper);color:var(--text);
  -webkit-font-smoothing:antialiased;
  min-height:100vh;display:flex;flex-direction:column;
  overflow-x:hidden;
}
/* Very subtle paper grain. Sits behind content so it never tints the paintings. */
body::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.28;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/><feColorMatrix values='0 0 0 0 .45 0 0 0 0 .40 0 0 0 0 .33 0 0 0 .5 0'/></filter><rect width='300' height='300' filter='url(%23n)'/></svg>");
}
img{display:block;max-width:100%;height:auto}
a{color:inherit}
button{font:inherit;color:inherit;cursor:pointer}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
[hidden]{display:none!important}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip-link{position:absolute;left:12px;top:-60px;z-index:10;background:var(--ink);color:var(--paper);padding:8px 14px;border-radius:4px;text-decoration:none}
.skip-link:focus{top:12px}

h1,h2,h3{font-family:var(--serif);font-weight:500;color:var(--ink);line-height:1.2}

/* ---------- Header + wash ---------- */
.site-header{position:relative;text-align:center;padding:56px var(--gutter) 12px;overflow:hidden}
.brand{position:relative;display:inline-block;isolation:isolate}
/* Slim watercolour stroke under the tagline */
.wash{
  position:absolute;left:50%;bottom:-24px;transform:translateX(-50%);
  width:min(520px,92vw);height:70px;z-index:-1;pointer-events:none;opacity:.85;
}
.brand>*:not(.wash){position:relative}
.mark{
  display:inline-block;font-family:var(--serif);font-weight:500;
  font-size:clamp(38px,7.5vw,50px);letter-spacing:.03em;line-height:1.15;
  color:var(--ink);text-decoration:none;
}
.tagline{font-family:var(--serif);font-style:italic;font-size:clamp(16px,3vw,18px);color:var(--muted);margin-top:4px}
.site-nav ul{
  list-style:none;padding:0;display:flex;flex-wrap:wrap;justify-content:center;
  gap:6px clamp(18px,4vw,34px);margin-top:40px;
}
.site-nav a{
  display:inline-block;padding:6px 0;font-size:13px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--faint);text-decoration:none;border-bottom:1px solid transparent;
}
.site-nav a:hover{color:var(--ink)}
@media (max-width:420px){.site-nav ul{gap:4px 16px}.site-nav a{font-size:12px;letter-spacing:.08em}}
.site-nav a[aria-current="page"]{color:var(--ink);border-bottom-color:var(--ink)}

/* ---------- Layout ---------- */
main{flex:1;width:100%;max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter)}
.intro{text-align:center;font-size:15px;line-height:1.7;color:var(--muted);max-width:600px;margin:26px auto}
.intro strong{font-weight:500;color:var(--ink)}

/* ---------- Mounted-print frame (reusable) ---------- */
.frame{background:var(--frame);padding:clamp(8px,1vw,12px);box-shadow:var(--shadow)}
.frame img{width:100%;height:auto}
.frame picture{display:block}

/* ---------- Buttons / pills ---------- */
.btn{
  display:inline-block;padding:11px 22px;border-radius:40px;border:1px solid var(--ink);
  background:var(--ink);color:var(--paper);font-size:13px;letter-spacing:.06em;text-decoration:none;
}
.btn:hover{background:#3d4a57}
.btn--ghost{background:transparent;color:var(--ink)}
.btn--ghost:hover{background:rgba(47,58,69,.06)}

/* ---------- Footer ---------- */
.site-footer{
  margin-top:80px;padding:28px var(--gutter) 36px;border-top:1px solid var(--rule);
  text-align:center;font-size:13px;color:var(--faint);
}
.site-footer p+p{margin-top:6px}
.site-footer a{color:var(--ink)}

/* ---------- Gallery filters ---------- */
.filters{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:0 0 40px;padding:0;list-style:none}
.filters button{
  padding:7px 16px;border-radius:40px;border:1px solid var(--rule);background:transparent;
  font-size:12px;letter-spacing:.06em;color:var(--faint);
}
.filters button:hover{border-color:var(--ink);color:var(--ink)}
.filters button[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--paper)}
.filters .count{margin-left:4px}

/* ---------- Gallery: a "salon hang" ----------
   Paintings hang like a wall of framed work: centred rows, varied sizes, each a little higher
   or lower and very slightly off level. gallery.js sets per-painting --h (image height),
   --dy (vertical offset) and --rot (tilt) from a hash of the file name, so the wall is
   varied but identical on every visit. Width follows the true aspect ratio (--r): never cropped. */
.gallery{
  --pad:9px;--scale:1;
  display:flex;flex-wrap:wrap;justify-content:center;align-items:center;
  gap:34px 36px;max-width:1240px;margin:0 auto;padding:0;list-style:none;
}
.tile{flex:0 0 auto;width:calc(var(--r) * var(--h) * var(--scale) + 2 * var(--pad));max-width:100%}
.tile a{display:block;text-decoration:none;color:inherit}
.tile .frame{
  padding:var(--pad);transform:translateY(var(--dy,0)) rotate(var(--rot,0));
  box-shadow:0 2px 3px rgba(60,50,30,.12),0 12px 28px rgba(60,50,30,.10);
  transition:box-shadow .25s ease,transform .25s ease;
}
.tile a:hover .frame,.tile a:focus-visible .frame{
  box-shadow:var(--shadow-hover);transform:translateY(calc(var(--dy,0) - 3px)) rotate(0deg);
}
.tile img{aspect-ratio:var(--r);background:var(--paper-deep)}
/* Handwritten title, as if pencilled on the wall label */
.tile figcaption{
  text-align:center;font-family:var(--hand);font-size:var(--hand-size);line-height:1.15;
  margin-top:10px;color:#55524b;
  transform:translate(var(--cx,0), calc(var(--dy,0) + var(--cy,0))) rotate(var(--crot,0));
}
.tile figcaption .amp{font-family:var(--serif);font-style:italic;font-size:.95em}
.tile[hidden]{display:none}
.gallery-empty{text-align:center;color:var(--muted)}
@media (max-width:1100px){.gallery{--scale:.88;gap:30px 28px}}
/* Phones: one painting per row, staggered left and right */
@media (max-width:700px){
  .gallery{--pad:7px;gap:30px 0}
  .tile{width:84%}
  .tile[data-side="left"]{margin-right:auto;margin-left:1%}
  .tile[data-side="right"]{margin-left:auto;margin-right:1%}
  .tile figcaption{font-size:max(16px, calc(var(--hand-size) - 2px))}
}
@media (prefers-reduced-motion:reduce){.tile .frame{transition:none}}

/* ---------- Lightbox ---------- */
.lightbox{
  width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;
  background:var(--paper);color:var(--text);overflow:hidden;
}
.lightbox::backdrop{background:rgba(47,58,69,.35)}
.lightbox[open]{display:flex;flex-direction:column}
.lb-stage{
  flex:1;min-height:0;display:flex;align-items:center;justify-content:center;
  padding:56px 72px 12px;touch-action:pan-y;
}
.lb-stage .frame{max-width:100%;max-height:100%;display:flex}
.lb-img{
  width:auto;height:auto;max-width:100%;
  max-height:calc(100vh - 56px - 12px - 170px - 24px);
  max-height:calc(100dvh - 56px - 12px - 170px - 24px);
  object-fit:contain;
}
.lb-info{text-align:center;padding:14px var(--gutter) 28px;min-height:170px}
.lb-title{font-family:var(--serif);font-weight:500;font-size:clamp(22px,3vw,28px);color:var(--ink)}
.lb-meta{font-size:13px;letter-spacing:.04em;color:var(--muted);margin-top:4px}
.lb-info .btn{margin-top:16px}
.lb-btn{
  position:absolute;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;
  border:1px solid var(--rule);background:rgba(255,255,255,.7);color:var(--ink);
}
.lb-btn:hover{background:#fff;border-color:var(--ink)}
.lb-btn svg{width:20px;height:20px}
.lb-close{top:10px;right:12px}
.lb-prev,.lb-next{top:calc(50% - 85px)}
.lb-prev{left:14px}
.lb-next{right:14px}
.lb-count{position:absolute;top:22px;left:20px;font-size:12px;letter-spacing:.08em;color:var(--faint)}
@media (max-width:700px){
  .lightbox[open]{justify-content:center}
  .lb-stage{flex:0 1 auto;padding:64px 12px 8px}
  .lb-prev,.lb-next{top:10px}
  .lb-prev{left:12px}
  .lb-next{left:64px;right:auto}
  .lb-count{left:0;right:0;text-align:center}
  .lb-info{min-height:0;padding-bottom:32px}
}

/* ---------- Content pages ---------- */
.page{max-width:880px;margin:0 auto}
.page-head{text-align:center;max-width:620px;margin:26px auto 48px}
.page-head h1{font-size:clamp(32px,5vw,42px)}
.page-head p{color:var(--muted);margin-top:10px;font-size:16px;line-height:1.7}
.page h2{font-size:clamp(26px,3.6vw,30px);margin-bottom:14px}
.page section+section{margin-top:64px}
.prose p{font-size:16px;line-height:1.75;color:var(--text)}
.prose p+p{margin-top:14px}
.prose em{font-style:italic}
.center{text-align:center}
.lead-price{
  font-family:var(--serif);font-size:clamp(22px,3vw,26px);color:var(--ink);text-align:center;
}
.lead-price strong{font-weight:600}
.small{font-size:13px;color:var(--faint)}

/* Commissions: three steps */
.steps{list-style:none;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:28px;counter-reset:step}
.steps li{counter-increment:step;text-align:center;padding:0 6px}
.steps li::before{
  content:counter(step);display:grid;place-items:center;width:44px;height:44px;margin:0 auto 14px;
  border-radius:50%;border:1px solid var(--rule);background:rgba(255,255,255,.6);
  font-family:var(--serif);font-size:22px;color:var(--ink);
}
.steps h3{font-size:22px;margin-bottom:6px}
.steps p{color:var(--muted);font-size:15px;line-height:1.65}
@media (max-width:760px){.steps{grid-template-columns:1fr;gap:32px}}

.checklist{list-style:none;padding:0;display:grid;gap:14px;max-width:620px;margin:0 auto}
.checklist li{position:relative;padding-left:30px;font-size:16px;line-height:1.65}
.checklist li::before{
  content:"";position:absolute;left:4px;top:.55em;width:10px;height:10px;border-radius:50%;
  background:var(--wash-blue);box-shadow:0 0 0 4px rgba(159,180,199,.25);
}
.checklist strong{font-weight:500;color:var(--ink)}

.examples{display:flex;flex-wrap:wrap;gap:24px;justify-content:center}
.examples figure{flex:var(--r) 1 calc(var(--r) * 140px + 20px);max-width:300px;min-width:0}
.examples figcaption{text-align:center;font-family:var(--hand);font-size:max(16px, calc(var(--hand-size) - 2px));line-height:1.15;margin-top:10px;color:#55524b}
.examples .frame{padding:10px}
.examples figure:nth-child(1) figcaption{transform:translate(-6px,1px) rotate(-1.4deg)}
.examples figure:nth-child(2) figcaption{transform:translate(8px,-1px) rotate(1deg)}
.examples figure:nth-child(3) figcaption{transform:translate(-3px,2px) rotate(-0.6deg)}

.cta{text-align:center;margin-top:56px}
.cta p{color:var(--muted);margin-bottom:16px}

/* About */
.about{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:clamp(28px,5vw,56px);align-items:start}
.about .frame{transform:rotate(-1.2deg)}
.about figcaption{transform:translateX(10px) rotate(-1.5deg);font-family:var(--hand);font-size:max(16px, calc(var(--hand-size) - 2px));line-height:1.15;color:#55524b;text-align:center;margin-top:14px}
@media (max-width:760px){.about{grid-template-columns:1fr}.about figure{max-width:380px;margin:0 auto}}
.credentials{
  list-style:none;padding:28px 0;margin:0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);
  display:grid;grid-template-columns:repeat(4,1fr);gap:24px;text-align:center;
}
.credentials strong{display:block;font-family:var(--serif);font-weight:500;font-size:20px;line-height:1.25;color:var(--ink)}
.credentials span{display:block;margin-top:6px;font-size:13px;color:var(--faint);line-height:1.5}
@media (max-width:900px){.credentials{grid-template-columns:repeat(2,1fr)}}
@media (max-width:420px){.credentials{grid-template-columns:1fr}}

/* Contact form */
.form{max-width:600px;margin:0 auto;display:grid;gap:20px}
.form .row2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media (max-width:560px){.form .row2{grid-template-columns:1fr}}
.field label{display:block;font-size:13px;letter-spacing:.04em;color:var(--muted);margin-bottom:6px}
.field .opt{color:var(--faint);font-size:12px}
.field input,.field textarea{
  width:100%;font:inherit;font-size:16px;color:var(--text);
  background:rgba(255,255,255,.75);border:1px solid var(--rule);border-radius:4px;padding:11px 13px;
}
.field textarea{min-height:170px;resize:vertical;line-height:1.6}
.field input:focus,.field textarea:focus{outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(47,58,69,.12);background:#fff}
.form .btn{justify-self:start;border-width:1px;font-size:14px;padding:12px 28px}
.form .btn[disabled]{opacity:.6;cursor:progress}
.form-note{font-size:13px;color:var(--faint);line-height:1.6}
.honey{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}
.form-status{padding:14px 16px;border-radius:4px;font-size:15px;line-height:1.6}
.form-status--error{background:#f6e3df;color:#7a2e22;border:1px solid #e7c3bb}
.form-success{max-width:600px;margin:0 auto;text-align:center;padding:36px 24px;background:rgba(255,255,255,.6);box-shadow:var(--shadow)}
.form-success h2{margin-bottom:8px}
.form-success p{color:var(--muted)}
.form-success button{margin-top:18px}

/* Privacy / long-form text */
.policy{max-width:680px;margin:0 auto}
.policy h2{font-size:26px;margin:40px 0 10px}
.policy h2:first-child{margin-top:0}
.policy .small{margin-top:40px}
