/*
Theme Name: Fletch
Description: John Fletcher - Design & Make. Lean custom theme, built Sep 2026 to replace RT Theme 19 + WPBakery. Projects come from the Fletch Projects must-use plugin.
Version: 1.0
Author: John Fletcher
Text Domain: fletch
*/

:root {
  --paper: #f4efe7;
  --paper-2: #ebe3d6;
  --ink: #1f1b16;
  --ink-2: #2b2620;
  --muted: #6d645a;
  --muted-dark: #b9ad9e;
  --rule: #d8cdbd;
  --rule-dark: #3d362e;
  --oak: #a8672f;
  --oak-light: #d9a46c;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
}
* { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.fill { display: block; width: 100%; height: 100%; object-fit: cover; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 12px; }

/* ---- header ---- */
.site-head { position: sticky; top: 0; z-index: 10; background: rgba(244,239,231,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.admin-bar .site-head { top: 32px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.mark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.mark b { font: 600 24px/1 var(--serif); letter-spacing: -.01em; }
.mark span { font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--oak); }
.nav { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a[aria-current] { color: var(--oak); }
.nav .cta { border: 1px solid var(--ink); padding: 8px 16px; border-radius: 999px; }
.nav .cta:hover { background: var(--ink); color: var(--paper); }

/* ---- shared type ---- */
.wrap .eyebrow { font: 600 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--oak); margin-bottom: 24px; }
.btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 14px 24px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; font-family: var(--sans); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--oak); }
.btn.line { border-color: var(--ink); background: transparent; }
.btn.line:hover { border-color: var(--oak); color: var(--oak); }
.dark .btn.line { border-color: var(--paper); }
.dark .btn.line:hover { border-color: var(--oak-light); color: var(--oak-light); }

/* ---- hero ---- */
.hero { padding: clamp(40px, 7vw, 96px) 0; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font: 400 clamp(44px, 6.4vw, 88px)/1.0 var(--serif); letter-spacing: -.025em; font-variation-settings: "opsz" 144; }
.hero h1 em { font-style: italic; color: var(--oak); }
.hero .lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 30em; margin: 28px 0 36px; }
.hero-img { position: relative; aspect-ratio: 4/5; border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.hero-img img { object-position: 45% 60%; }
.hero-img figcaption { position: absolute; left: 16px; bottom: 16px; background: var(--paper); padding: 6px 12px; font-size: 13px; font-weight: 500; border-radius: 2px; }
.hero-img figcaption a { text-decoration: none; }

/* ---- two sides ---- */
.sides { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sides .wrap { display: grid; grid-template-columns: 1fr 1fr; }
.side { padding: 40px 0; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; text-decoration: none; }
.side + .side { border-left: 1px solid var(--rule); padding-left: clamp(24px, 4vw, 56px); }
.side .num { font: 400 15px/1 var(--serif); color: var(--oak); padding-top: 8px; }
.side h2 { font: 400 30px/1.15 var(--serif); letter-spacing: -.01em; margin-bottom: 8px; }
.side p { color: var(--muted); max-width: 26em; }
.side .go { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 14px; border-bottom: 1px solid currentColor; }
.side:hover h2 { color: var(--oak); }

/* ---- section heads ---- */
.block { padding: clamp(64px, 9vw, 120px) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.sec-head h2, .page-head h1 { font: 400 clamp(36px, 4.6vw, 60px)/1.02 var(--serif); letter-spacing: -.02em; }
.sec-head p { color: var(--muted); max-width: 28em; }
.more { margin-top: 36px; }

/* ---- current work (featured sites) ---- */
.current-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3vw, 40px); }
.current { display: block; text-decoration: none; }
.current .shot { aspect-ratio: 16/10; overflow: hidden; border-radius: 6px; background: var(--paper-2); box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(31,27,22,.45); border: 1px solid var(--rule); }
.current .shot img { object-position: 50% 0; transition: transform .6s ease; }
.current:hover .shot img { transform: scale(1.02); }
.current .meta { margin-top: 22px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.current h3 { font: 400 clamp(26px, 2.6vw, 34px)/1.1 var(--serif); letter-spacing: -.01em; }
.current:hover h3 { color: var(--oak); }
.current .kind { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--oak); white-space: nowrap; }
.current p { color: var(--muted); margin-top: 10px; max-width: 34em; }
.current .url { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 14px; border-bottom: 1px solid currentColor; }

/* ---- woodwork grid (homepage pattern) ---- */
.wood-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(150px, 17vw, 240px); gap: 16px; }
.piece { position: relative; display: block; overflow: hidden; border-radius: 3px; background: var(--paper-2); text-decoration: none; }
.piece img { transition: transform .6s ease; }
.piece:hover img { transform: scale(1.03); }
.piece .cap { position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; background: linear-gradient(transparent, rgba(20,16,12,.72)); color: #fff; }
.piece .cap b { display: block; font: 400 21px/1.2 var(--serif); }
.piece .cap span { font-size: 13px; opacity: .85; }
.wood-grid .p1 { grid-column: span 7; grid-row: span 2; }
.wood-grid .p2 { grid-column: span 5; grid-row: span 2; }
.wood-grid .p3, .wood-grid .p4, .wood-grid .p5 { grid-column: span 4; }
.wood-grid .p6 { grid-column: span 5; grid-row: span 2; }
.wood-grid .p7 { grid-column: span 7; grid-row: span 2; }

/* ---- plain project grid (listing pages) ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-3 .piece { aspect-ratio: 4/3; }

/* ---- commission strip ---- */
.commission { background: var(--paper-2); }
.commission .wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.commission h2 { font: 400 clamp(30px, 3.4vw, 44px)/1.1 var(--serif); letter-spacing: -.015em; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 1px solid var(--ink); padding-top: 16px; }
.steps li::before { content: "0" counter(s); font: 400 14px/1 var(--serif); color: var(--oak); display: block; margin-bottom: 10px; }
.steps b { display: block; font-weight: 600; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; }

/* ---- design work (dark) ---- */
.dark { background: var(--ink); color: var(--paper); }
.dark .sec-head p { color: var(--muted-dark); }
.dark .wrap .eyebrow { color: var(--oak-light); }
.design-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.work { display: block; text-decoration: none; }
.work .thumb { aspect-ratio: 4/3; overflow: hidden; border-radius: 3px; background: var(--ink-2); }
.work .thumb img { transition: transform .6s ease; }
.work.t-infographic .thumb img { object-position: 50% 0; }
.work:hover .thumb img { transform: scale(1.03); }
.work .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; border-top: 1px solid var(--rule-dark); padding-top: 12px; }
.work b { font: 400 21px/1.25 var(--serif); }
.work .kind { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--oak-light); white-space: nowrap; }
.work:hover b { color: var(--oak-light); }
.light .work .thumb { background: var(--paper-2); }
.light .work .meta { border-top-color: var(--rule); }
.light .work .kind { color: var(--oak); }
.light .work:hover b { color: var(--oak); }

/* ---- about ---- */
.about .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about .portrait { aspect-ratio: 4/5; border-radius: 3px; overflow: hidden; }
.about .portrait img { object-position: 50% 30%; }
.about h2 { font: 400 clamp(36px, 4.6vw, 60px)/1.02 var(--serif); letter-spacing: -.02em; margin-bottom: 24px; }
.about .copy p:not(.eyebrow):not(.sign) { font-size: 19px; color: var(--ink-2); margin-bottom: 18px; max-width: 32em; }
.about .sign { font: italic 400 24px/1 var(--serif); color: var(--oak); margin-top: 28px; }

/* ---- contact band ---- */
.contact { background: var(--oak); color: #fff; text-align: center; }
.contact h2 { font: 400 clamp(40px, 6vw, 80px)/1.0 var(--serif); letter-spacing: -.025em; margin-bottom: 20px; }
.contact p { font-size: 19px; opacity: .92; max-width: 30em; margin: 0 auto 36px; }
.contact .btn { background: var(--paper); color: var(--ink); }
.contact .btn:hover { background: var(--ink); color: var(--paper); }

/* ---- page + project headers ---- */
.page-head { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 48px); }
.page-head .intro { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 34em; margin-top: 20px; }
.page-head .facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 24px; font-size: 14px; color: var(--muted); }
.page-head .facts b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.page-head .facts a { color: var(--oak); font-weight: 600; }
.lead-img { border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.lead-img img { display: block; width: 100%; height: auto; max-height: 82vh; object-fit: contain; background: var(--paper-2); }
.lead-img.shot { border: 1px solid var(--rule); }

/* ---- content from the editor ---- */
.entry { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(64px, 8vw, 104px); }
.entry > * { max-width: 760px; }
.entry > .alignwide, .entry > .wp-block-gallery { max-width: none; }
.entry > * + * { margin-top: 1.2em; }
.entry p, .entry li { font-size: 18px; }
.entry h2 { font: 400 34px/1.15 var(--serif); margin-top: 1.6em; }
.entry h3 { font: 600 20px/1.3 var(--sans); margin-top: 1.4em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry a { color: var(--oak); }
.entry .wp-block-gallery.has-nested-images { gap: 16px; }
.entry .wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 3px; }
.entry .wp-block-image img { border-radius: 3px; }

/* ---- more projects ---- */
.related { border-top: 1px solid var(--rule); }

/* ---- contact form (Contact Form 7) ---- */
.wpcf7 form p { margin: 0 0 18px; font-weight: 500; font-size: 15px; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: 400 17px/1.4 var(--sans); color: var(--ink); background: #fffdf9; border: 1px solid var(--rule); border-radius: 4px; }
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 2px solid var(--oak); outline-offset: 1px; border-color: var(--oak); }
.wpcf7 textarea { min-height: 180px; }
.wpcf7 input[type=submit] { background: var(--ink); color: var(--paper); border: 0; padding: 14px 28px; border-radius: 999px; font: 600 15px/1 var(--sans); cursor: pointer; }
.wpcf7 input[type=submit]:hover { background: var(--oak); }
.wpcf7-not-valid-tip { color: #a3321f; font-size: 14px; }
.wpcf7 form .wpcf7-response-output { margin: 18px 0 0; border-radius: 4px; }

/* ---- footer ---- */
.site-foot { background: var(--ink); color: var(--muted-dark); font-size: 14px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; }
.site-foot a { color: var(--muted-dark); }
.site-foot a:hover { color: var(--paper); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .nav li:not(:last-child) { display: none; }
  .hero .wrap, .commission .wrap, .about .wrap { grid-template-columns: 1fr; }
  .hero-img { aspect-ratio: 4/3; }
  .sides .wrap { grid-template-columns: 1fr; }
  .side + .side { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; }
  .current-grid { grid-template-columns: 1fr; gap: 48px; }
  .wood-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 42vw; gap: 10px; }
  .wood-grid .piece { grid-column: span 1; grid-row: span 1; }
  .wood-grid .p1, .wood-grid .p6, .wood-grid .p7 { grid-column: span 2; }
  .piece .cap { padding: 28px 12px 10px; }
  .piece .cap b { font-size: 17px; }
  .piece .cap span { display: none; }
  .grid-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .design-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .about .portrait { aspect-ratio: 1/1; max-width: 420px; }
}
@media (max-width: 782px) {
  .admin-bar .site-head { top: 46px; }
}
@media (max-width: 560px) {
  .design-grid { grid-template-columns: 1fr; }
  .mark span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .piece img, .work .thumb img, .current .shot img { transition: none; }
}
