/* ==========================================================================
   KYR Websites — Elevate. Innovate. Achieve.
   ========================================================================== */

:root {
  /* Brand */
  --ink: #0e0d0b;
  --ink-2: #1b1a17;
  --ink-3: #26241f;
  --cream: #f7f3ea;
  --cream-2: #efe7d6;
  --paper: #fffdf8;
  --gold: #c9a454;
  --gold-deep: #7a5c2e;
  --gold-light: #d8d380;
  --gold-gradient: linear-gradient(100deg, #ad884f 0%, #d8d380 42%, #c4a865 62%, #ad884f 100%);
  --line-dark: rgba(201, 164, 84, 0.28);
  --line-light: rgba(154, 120, 64, 0.25);

  --text-on-dark: #f3efe5;
  --muted-on-dark: #aaa497;
  --text-on-light: #1b1a17;
  --muted-on-light: #5d584d;

  /* Type */
  --font-sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Bitter", Georgia, serif;

  /* Layout */
  --max: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-on-light);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--gold-light); color: var(--ink); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: .6rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: .78rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.25rem;
}
.eyebrow::before { content: ""; width: 48px; height: 1px; background: currentColor; }
.on-light .eyebrow { color: var(--gold-deep); }
.on-dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--gold); }

.gold-text { color: var(--gold-light); }
.on-light .gold-text { color: var(--gold-deep); }
.serif-accent { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; line-height: 1.25; }

.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; max-width: 38ch; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--gold-gradient);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 1rem 1.6rem;
  font: 600 .82rem/1 var(--font-sans); letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  background: var(--btn-bg); background-size: 200% 100%; background-position: 0 0;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer;
  transition: background-position .6s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(201, 164, 84, .55); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent; color: var(--text-on-dark);
  border-color: var(--line-dark);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); box-shadow: none; }
.on-light .btn-ghost { color: var(--text-on-light); border-color: var(--line-light); }
.on-light .btn-ghost:hover { color: var(--gold-deep); border-color: var(--gold-deep); }

.text-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .85rem; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: var(--gold-deep);
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
}
.on-dark .text-link { color: var(--gold); }
.text-link:hover .arrow { transform: translateX(4px); }
.text-link .arrow { transition: transform .3s var(--ease); }

/* ---------- Promo bar ---------- */
.promo-bar {
  background: var(--gold-gradient); color: var(--ink);
  font-size: .85rem; font-weight: 500; text-align: center;
  padding: .55rem var(--gutter);
}
.promo-bar a { font-weight: 700; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 13, 11, .97);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(201, 164, 84, .14);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 2rem; }
.brand { display: block; flex-shrink: 0; }
.brand img { height: 42px; width: auto; }

.nav { display: flex; align-items: center; gap: 2.2rem; }
.nav a:not(.btn) {
  color: var(--muted-on-dark); text-decoration: none; font-size: .95rem; font-weight: 500;
  position: relative; padding: .4rem 0; transition: color .25s;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--text-on-dark); }
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { padding: .8rem 1.2rem; font-size: .74rem; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-dark); border-radius: var(--radius);
  width: 46px; height: 46px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--gold); transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 78px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line-dark);
    padding: .5rem var(--gutter) 1.5rem;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .3s var(--ease), visibility .25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 1rem 0; border-bottom: 1px solid rgba(201,164,84,.12); font-size: 1.1rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1.2rem; padding: 1rem; }
  .brand img { height: 34px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 11vw, 150px); position: relative; scroll-margin-top: 70px; }
.on-dark { background: var(--ink); color: var(--text-on-dark); }
.on-dark .muted, .on-dark p { color: var(--muted-on-dark); }
.on-light { background: var(--cream); color: var(--text-on-light); }
.on-light .muted { color: var(--muted-on-light); }
.on-paper { background: var(--paper); }

.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem; align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head p { margin: 0; max-width: 46ch; }
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(201,164,84,.13), transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 100%, rgba(201,164,84,.08), transparent 70%),
    var(--ink);
  color: var(--text-on-dark);
  padding: clamp(28px, 3vw, 40px) 0;
  overflow: hidden;
}
.hero-frame {
  position: relative;
  border: 1px solid var(--line-dark);
  padding: clamp(40px, 6vw, 80px) clamp(24px, 6vw, 80px) clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem;
  align-items: end;
}
/* gold corner ticks — echoes the framed K mark */
.hero-frame::before, .hero-frame::after {
  content: ""; position: absolute; width: 28px; height: 28px; border-color: var(--gold); border-style: solid;
}
.hero-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.hero-frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.hero h1 {
  font-size: clamp(2.7rem, 5.8vw, 5.4rem); max-width: 13.5ch;
  line-height: .98; letter-spacing: -0.035em; font-weight: 600;
  margin-bottom: 2rem;
}
.hero h1 .serif-accent { letter-spacing: -0.02em; font-weight: 300; }
.hero .lede { color: var(--muted-on-dark); margin: 0 0 2.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-side { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.hero-mark {
  width: clamp(160px, 18vw, 250px); aspect-ratio: 1.33;
  border: 1px solid var(--gold); position: relative;
  display: grid; place-items: center;
}
.hero-mark span {
  font-weight: 600; font-size: clamp(5.5rem, 10vw, 8.5rem); line-height: 1;
  background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-mark::after {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(201,164,84,.18);
}
.hero-signature { font-size: .9rem; color: var(--muted-on-dark); margin: 0; line-height: 1.5; }
.hero-signature strong { display: block; color: var(--text-on-dark); font-weight: 500; font-size: 1rem; }

@media (max-width: 900px) {
  .hero-frame { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; align-items: center; }
  .hero-mark { width: 120px; }
  .hero-mark span { font-size: 4rem; }
  .hero-mark::after { inset: 6px; }
}

/* ---------- Marquee ---------- */
.marquee {
  background: var(--ink-2); color: var(--muted-on-dark);
  border-block: 1px solid rgba(201,164,84,.14);
  overflow: hidden; white-space: nowrap; padding: 1.15rem 0;
}
.marquee-track { display: inline-flex; animation: marquee 38s linear infinite; }
.marquee span {
  display: inline-flex; align-items: center; gap: 2.5rem; padding-right: 2.5rem;
  font-size: .82rem; letter-spacing: .3em; text-transform: uppercase;
}
.marquee span::after { content: "◆"; color: var(--gold); font-size: .55rem; letter-spacing: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Services ---------- */
.services-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-light); }
.service {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.1fr) 40px; gap: 1.5rem 2rem;
  align-items: baseline;
  padding: 2.2rem 0; border-bottom: 1px solid var(--line-light);
  position: relative;
}
.service-num { font-family: var(--font-serif); font-style: italic; color: var(--gold-deep); font-size: 1.1rem; }
.service h3 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); font-weight: 500; letter-spacing: -0.02em; }
.service p { margin: 0; color: var(--muted-on-light); }
.service-icon { color: var(--gold-deep); justify-self: end; transition: transform .4s var(--ease); }
.service > * { transition: transform .4s var(--ease); }
.service:hover > :not(.service-icon) { transform: translateX(1rem); }
.service:hover .service-icon { transform: rotate(45deg); }
@media (max-width: 800px) {
  .service { grid-template-columns: 50px 1fr; }
  .service p { grid-column: 2; }
  .service-icon { display: none; }
  .service:hover > :not(.service-icon) { transform: none; }
}

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; }
.step { padding: 0 2.5rem 0 0; position: relative; }
.step + .step { padding-left: 2.5rem; border-left: 1px solid var(--line-dark); }
.step-num {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold);
  display: grid; place-items: center;
  font-weight: 600; font-size: 1.1rem; margin-bottom: 2rem;
}
.step h3 { color: var(--text-on-dark); margin-bottom: .75rem; font-size: 1.5rem; }
.step p { margin: 0; }
@media (max-width: 800px) {
  .process { grid-template-columns: 1fr; gap: 3rem; }
  .step, .step + .step { padding: 0 0 0 76px; border: 0; }
  .step-num { position: absolute; left: 0; top: -6px; width: 52px; height: 52px; margin: 0; }
}

/* ---------- Work ---------- */
.work-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-light); }
.work-item {
  display: flex;
  padding: clamp(1.25rem, 2.4vw, 2rem) 0; border-bottom: 1px solid var(--line-light);
}
.work-item .name {
  font-size: clamp(1.8rem, 5.2vw, 4.2rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05;
  transition: color .3s, transform .5s var(--ease);
}
.work-item .tag {
  font-size: .95rem; letter-spacing: .01em; color: var(--muted-on-light);
  white-space: nowrap;
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(3rem, 7vw, 7rem); align-items: center; }
.portrait { position: relative; margin: 0; }
.portrait img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  filter: saturate(1.02) contrast(1.02);
}
.portrait::before {
  content: ""; position: absolute; inset: -18px 18px 18px -18px;
  border: 1px solid var(--gold); z-index: -1;
}
.portrait { z-index: 0; isolation: isolate; }
.portrait figcaption {
  position: absolute; right: -1px; bottom: -1px;
  background: var(--ink); color: var(--text-on-dark);
  padding: 1rem 1.25rem; font-size: .9rem; line-height: 1.35;
}
.portrait figcaption strong { display: block; color: var(--gold); font-weight: 600; letter-spacing: .02em; }
.about h2 { margin-bottom: 1.75rem; }
.about p { margin: 0 0 1.25rem; max-width: 54ch; }
.about-stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin: 2.5rem 0; padding: 1.75rem 0; border-block: 1px solid var(--line-light); }
.about-stats div { display: flex; flex-direction: column; }
.about-stats strong { font-size: 2.4rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; color: var(--gold-deep); }
.about-stats span { font-size: .85rem; color: var(--muted-on-light); margin-top: .4rem; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 440px; margin-left: 18px; }
}

/* ---------- Testimonial ---------- */
.quote-block { text-align: center; max-width: 900px; margin-inline: auto; }
.stars { color: var(--gold); letter-spacing: .3em; font-size: 1.1rem; margin-bottom: 1.5rem; }
.quote-block blockquote { margin: 0; }
.quote-block blockquote p {
  font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: clamp(1.9rem, 4.4vw, 3.4rem); line-height: 1.2; color: var(--text-on-dark) !important;
  margin: 0 0 1.75rem;
}
.quote-block cite { font-style: normal; font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }

/* ---------- Offer ---------- */
.offer {
  position: relative; border: 1px solid var(--line-dark);
  padding: clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: auto 1fr; gap: 2rem clamp(2rem, 6vw, 6rem); align-items: center;
  background: radial-gradient(ellipse 60% 80% at 0% 0%, rgba(201,164,84,.10), transparent 70%), var(--ink-2);
}
.offer-big { font-size: clamp(5rem, 13vw, 10.5rem); font-weight: 700; line-height: .85; letter-spacing: -0.05em; color: var(--text-on-dark); }
.offer-big .pct { color: var(--gold); }
.offer-big small { display: block; font-size: .3em; font-weight: 600; letter-spacing: -0.02em; color: var(--gold); margin-top: .35em; }
.offer h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--text-on-dark); margin-bottom: 1rem; }
.offer p { margin: 0 0 2rem; max-width: 46ch; }
.offer-features { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; padding: 0; margin: 0 0 2rem; }
.offer-features li { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-on-dark); display: flex; align-items: center; gap: .6rem; }
.offer-features li::before { content: ""; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
@media (max-width: 800px) { .offer { grid-template-columns: 1fr; } }

/* ---------- Blog cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.post-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.post-card .thumb { overflow: hidden; border: 1px solid var(--line-light); margin-bottom: 1.4rem; aspect-ratio: 1; background: var(--cream-2); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-meta { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: .7rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.post-meta span + span::before { content: "·"; margin-right: .8rem; }
.post-card h3 { font-size: 1.4rem; margin-bottom: .7rem; transition: color .25s; }
.post-card:hover h3 { color: var(--gold-deep); }
.post-card p { margin: 0; color: var(--muted-on-light); font-size: 1rem; }
@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(3rem, 7vw, 6rem); }
.contact h2 { margin-bottom: 1.5rem; }
.contact-details { list-style: none; padding: 0; margin: 2.5rem 0 0; border-top: 1px solid var(--line-dark); }
.contact-details li { display: flex; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-dark); align-items: baseline; }
.contact-details .label { width: 70px; flex-shrink: 0; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.contact-details a { color: var(--text-on-dark); text-decoration: none; font-size: 1.15rem; }
.contact-details a:hover { color: var(--gold-light); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-on-dark); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text-on-dark);
  background: transparent; border: 0; border-bottom: 1px solid rgba(201,164,84,.35);
  padding: .7rem 0; border-radius: 0;
  transition: border-color .25s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--ink); color: var(--text-on-dark); }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold); }
.field input::placeholder, .field textarea::placeholder { color: #8a8478; }
.form .btn { justify-self: start; align-self: start; margin-top: .5rem; }
.form-note { grid-column: 1 / -1; font-size: .85rem; margin: 0; color: var(--muted-on-dark); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--muted-on-dark); padding: clamp(60px, 8vw, 100px) 0 2rem; border-top: 1px solid rgba(201,164,84,.14); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; padding-bottom: 3.5rem; border-bottom: 1px solid rgba(201,164,84,.14); }
.footer-top img { height: 52px; width: auto; margin-bottom: 1.5rem; }
.footer-top p { margin: 0; max-width: 34ch; font-size: .95rem; }
.footer-top h2 { font-size: .75rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 1.2rem; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-top a { text-decoration: none; color: var(--muted-on-dark); transition: color .2s; }
.footer-top a:hover { color: var(--text-on-dark); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 2rem; font-size: .85rem; }
.footer-bottom .tagline { letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-size: .75rem; }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- Blog index & article ---------- */
.page-hero { background: var(--ink); color: var(--text-on-dark); padding: clamp(70px, 10vw, 130px) 0 clamp(50px, 7vw, 90px); position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--gold-gradient); opacity: .5; }
.page-hero h1 { font-size: clamp(2.6rem, 6.5vw, 5.4rem); letter-spacing: -0.035em; line-height: 1; margin-bottom: 1.5rem; max-width: 16ch; }
.page-hero p { color: var(--muted-on-dark); max-width: 52ch; margin: 0; font-size: 1.15rem; }

.featured-post { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; text-decoration: none; color: inherit; padding-bottom: clamp(48px, 6vw, 80px); margin-bottom: clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line-light); }
.featured-post .thumb { overflow: hidden; border: 1px solid var(--line-light); aspect-ratio: 1; }
.featured-post .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.featured-post:hover .thumb img { transform: scale(1.03); }
.featured-post h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); margin-bottom: 1.25rem; }
.featured-post p { color: var(--muted-on-light); margin: 0 0 2rem; }
@media (max-width: 800px) { .featured-post { grid-template-columns: 1fr; } }

.article-hero { background: var(--ink); color: var(--text-on-dark); padding: clamp(56px, 8vw, 110px) 0 0; }
.article-hero .container { max-width: 860px; }
.back-link { display: inline-flex; gap: .5rem; align-items: center; color: var(--muted-on-dark); text-decoration: none; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2.5rem; }
.back-link:hover { color: var(--gold); }
.article-hero h1 { font-size: clamp(2.3rem, 5.5vw, 4.2rem); letter-spacing: -0.03em; line-height: 1.04; margin-bottom: 1.5rem; }
.article-hero .dek { color: var(--muted-on-dark); font-size: 1.2rem; margin: 0 0 2rem; max-width: 52ch; }
.byline { display: flex; align-items: center; gap: 1rem; padding-bottom: clamp(48px, 6vw, 80px); }
.byline img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; border: 2px solid var(--gold); }
.byline div { font-size: .9rem; line-height: 1.4; color: var(--muted-on-dark); }
.byline strong { display: block; color: var(--text-on-dark); font-weight: 500; }

.article-cover { background: linear-gradient(var(--ink) 50%, var(--paper) 50%); }
.article-cover .container { max-width: 860px; }
.article-cover img { width: 100%; border: 1px solid var(--line-dark); aspect-ratio: 1; object-fit: cover; }
@media (min-width: 700px) { .article-cover img { aspect-ratio: auto; max-height: 620px; object-fit: contain; background: var(--ink-2); } }

.prose { max-width: 700px; margin-inline: auto; padding: clamp(48px, 7vw, 90px) var(--gutter) clamp(70px, 9vw, 120px); font-size: 1.125rem; line-height: 1.8; }
.prose > * + * { margin-top: 1.4em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 2.4em; line-height: 1.15; }
.prose h3 { font-size: 1.3rem; margin-top: 2em; }
.prose a { color: var(--gold-deep); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .6em; }
.prose li::marker { color: var(--gold-deep); }
.prose strong { font-weight: 600; }
.prose code { font-size: .9em; background: var(--cream-2); padding: .1em .4em; border-radius: 3px; }
.prose .intro { font-size: 1.3rem; line-height: 1.6; color: var(--text-on-light); }
.prose .intro::first-letter { font-family: var(--font-serif); float: left; font-size: 4.2em; line-height: .85; padding: .06em .12em 0 0; color: var(--gold-deep); }

.callout { border-left: 2px solid var(--gold); background: var(--cream); padding: 1.5rem 1.75rem; }
.callout p { margin: 0; }
.callout strong { color: var(--gold-deep); }

.settings-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.settings-table th, .settings-table td { text-align: left; padding: .8rem .75rem; border-bottom: 1px solid var(--line-light); vertical-align: top; }
.settings-table th { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }
.table-wrap { overflow-x: auto; }

.q-list { list-style: none; padding: 0 !important; counter-reset: q; }
.q-list li { counter-increment: q; position: relative; padding-left: 3.4rem; }
.q-list li + li { margin-top: 2em; }
.q-list li::before { content: counter(q, decimal-leading-zero); position: absolute; left: 0; top: .1em; font-family: var(--font-serif); font-style: italic; color: var(--gold-deep); font-size: 1.3rem; }
.q-list h3 { margin: 0 0 .4em; font-size: 1.25rem; }
.q-list p { margin: 0; }

.article-cta { background: var(--ink); color: var(--text-on-dark); border: 1px solid var(--line-dark); padding: clamp(2rem, 4vw, 3rem); margin-top: 3em !important; position: relative; }
.article-cta::before { content: ""; position: absolute; top: -1px; left: -1px; width: 22px; height: 22px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.article-cta h2 { margin: 0 0 .75rem !important; font-size: 1.7rem; color: var(--text-on-dark); }
.article-cta p { color: var(--muted-on-dark); margin: 0 0 1.5rem; line-height: 1.6; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

.article-hero .post-meta, .page-hero .post-meta { color: var(--gold); }
.prose figure { margin: 2.4em 0 0; }
.prose figure img { width: 100%; max-width: 520px; border: 1px solid var(--line-light); }
.prose figcaption { font-size: .9rem; color: var(--muted-on-light); margin-top: .75rem; line-height: 1.5; }

/* ---------- Portfolio ---------- */
.page-hero .hero-stats { display: flex; flex-wrap: wrap; gap: 1.5rem 3.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line-dark); }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; line-height: 1; letter-spacing: -0.03em; color: var(--gold-light); }
.hero-stats span { color: var(--muted-on-dark); font-size: .9rem; margin-top: .4rem; }

.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: clamp(36px, 5vw, 56px); }
.filter {
  font: 500 .8rem/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase;
  padding: .8rem 1.1rem; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted-on-light); border: 1px solid var(--line-light);
  transition: background .25s, color .25s, border-color .25s;
}
.filter:hover { border-color: var(--gold-deep); color: var(--text-on-light); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--gold-light); }
.filter .count { opacity: .6; margin-left: .35rem; }

.site-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 3vw, 3rem) clamp(1.25rem, 2.5vw, 2rem); }
.site-grid.is-featured { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .site-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .site-grid, .site-grid.is-featured { grid-template-columns: 1fr; } }

.site-card { display: flex; flex-direction: column; }
.site-card[hidden] { display: none; }
.browser {
  display: block; text-decoration: none; overflow: hidden;
  border: 1px solid var(--line-light); border-radius: 6px; background: var(--ink);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--ink-2); border-bottom: 1px solid rgba(201,164,84,.18); }
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(201,164,84,.45); }
.browser-bar span { margin-left: 8px; font-size: .72rem; color: var(--muted-on-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.site-card:hover .browser { transform: translateY(-4px); box-shadow: 0 24px 50px -24px rgba(14,13,11,.45); border-color: var(--gold); }
.site-card:hover .browser img { transform: scale(1.03); }
.site-info { padding-top: 1.25rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.site-meta { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); display: flex; flex-wrap: wrap; gap: .3rem .8rem; }
.site-meta span + span::before { content: "·"; margin-right: .8rem; }
.site-card h3 { font-size: 1.35rem; }
.site-card p { margin: 0; color: var(--muted-on-light); font-size: .98rem; line-height: 1.55; }
.site-card .visit { margin-top: auto; padding-top: .6rem; align-self: flex-start; font-size: .78rem; }

/* Case study */
.case { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.case .browser { border-color: var(--line-dark); }
.case h2 { margin-bottom: 1.25rem; }
.case p { margin: 0 0 1.25rem; max-width: 46ch; }
.case-list { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: .75rem; }
.case-list li { display: flex; gap: .8rem; align-items: baseline; color: var(--text-on-dark); }
.case-list li::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; background: var(--gold); transform: rotate(45deg) translateY(-2px); }
@media (max-width: 860px) { .case { grid-template-columns: 1fr; } }

/* Testimonials */
.testimonials { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.testimonial { margin: 0; }
.testimonial blockquote { margin: 0 0 1.5rem; }
.testimonial blockquote p { margin: 0; color: var(--text-on-dark) !important; line-height: 1.55; }
.testimonial.lead blockquote p { font-family: var(--font-serif); font-style: italic; font-weight: 300; font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.4; }
.testimonial.lead::before { content: "\201C"; display: block; font-family: var(--font-serif); font-size: 6rem; line-height: .6; color: var(--gold); margin-bottom: 1rem; }
.testimonial-stack { display: grid; gap: 2.5rem; }
.testimonial-stack .testimonial { padding-top: 2rem; border-top: 1px solid var(--line-dark); }
.testimonial-stack .testimonial:first-child { padding-top: 0; border-top: 0; }
.testimonial-stack blockquote p { font-size: 1.05rem; color: var(--muted-on-dark) !important; }
.testimonial figcaption { display: flex; flex-direction: column; gap: .2rem; font-size: .95rem; }
.testimonial figcaption strong { color: var(--text-on-dark); font-weight: 500; }
.testimonial figcaption span { color: var(--gold); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; }
.testimonials-head { display: flex; align-items: center; gap: 1rem; margin-bottom: clamp(40px, 5vw, 64px); }
@media (max-width: 860px) { .testimonials { grid-template-columns: 1fr; } }

/* Homepage work rows: thumbnail + link */
.work-item a { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; width: 100%; text-decoration: none; color: inherit; }
.work-item .work-text { display: flex; flex-direction: column; gap: .35rem; }
.work-item .work-thumb { width: clamp(120px, 18vw, 220px); aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--line-light); border-radius: 4px; flex-shrink: 0; transition: transform .5s var(--ease), border-color .3s; }
.work-item:hover .work-thumb { transform: rotate(-2deg) scale(1.04); border-color: var(--gold-deep); }
.work-item:hover .name { transform: translateX(12px); color: var(--gold-deep); }
.work-more { margin-top: clamp(32px, 4vw, 48px); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.work-more p { margin: 0; color: var(--muted-on-light); }
@media (max-width: 600px) { .work-item a { flex-direction: column-reverse; align-items: flex-start; } .work-item .work-thumb { width: 100%; } }
@media (max-width: 600px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex-shrink: 0; padding: .7rem 1rem; font-size: .74rem; }
}
.soon-badge { margin-left: auto; flex-shrink: 0; font: 600 .62rem/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); background: var(--gold); padding: .2rem .55rem; margin-block: -2px; border-radius: 999px; }
@media (min-width: 1100px) { .post-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } .post-grid.cols-4 h3 { font-size: 1.2rem; } }
.site-loc { font-size: .9rem; color: var(--muted-on-light); margin-top: -.2rem; }

/* Portfolio tabs */
.tabs { display: inline-flex; gap: .35rem; margin-top: 2.5rem; padding: .35rem; border: 1px solid var(--line-dark); border-radius: 999px; }
.tab { padding: .75rem 1.4rem; border-radius: 999px; text-decoration: none; font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-on-dark); transition: color .25s, background .25s; }
.tab:hover { color: var(--text-on-dark); }
.tab[aria-current="page"] { background: var(--gold-gradient); color: var(--ink); }

/* Photography gallery */
/* Justified rows: each photo grows in proportion to its aspect ratio (--r), so rows fill edge to edge in reading order */
.gallery { --row: 230px; --gap: clamp(.6rem, 1.2vw, 1rem); display: flex; flex-wrap: wrap; gap: var(--gap); }
.gallery::after { content: ""; flex-grow: 999; }
.photo { flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--row)); display: block; overflow: hidden; border-radius: 4px; position: relative; cursor: zoom-in; background: var(--cream-2); }
.photo img { width: 100%; height: 100%; aspect-ratio: var(--r); object-fit: cover; transition: transform .8s var(--ease); }
.photo::after { content: ""; position: absolute; inset: 0; border: 1px solid transparent; border-radius: 4px; transition: border-color .3s; pointer-events: none; }
.photo:hover img { transform: scale(1.04); }
.photo:hover::after { border-color: var(--gold); }
@media (max-width: 900px) { .gallery { --row: 190px; } }
@media (max-width: 600px) { .gallery { --row: 140px; } }

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(14, 13, 11, .96); color: var(--text-on-dark); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(14, 13, 11, .96); }
.lightbox img { max-width: min(92vw, 1400px); max-height: 82vh; width: auto; height: auto; border-radius: 4px; }
.lightbox-caption { position: absolute; left: 0; right: 0; bottom: 2.5vh; text-align: center; margin: 0; padding: 0 5rem; color: var(--muted-on-dark); font-size: .95rem; }
.lightbox-btn { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-dark); background: rgba(27,26,23,.8); color: var(--gold-light); font-size: 1.4rem; line-height: 1; cursor: pointer; transition: border-color .25s, background .25s; }
.lightbox-btn:hover { border-color: var(--gold); background: var(--ink-3); }
.lightbox .close { top: 20px; right: 20px; font-size: 1.8rem; }
.lightbox .prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox .prev, .lightbox .next { top: auto; bottom: 14px; transform: none; } .lightbox-caption { bottom: 80px; padding: 0 1rem; } }
.inline-link { color: var(--gold-deep); font-weight: 500; text-underline-offset: 3px; white-space: nowrap; }
.inline-link:hover { color: var(--text-on-light); }
.photo[hidden] { display: none; }
#photo-filters { margin-bottom: clamp(24px, 3vw, 36px); }

/* Contact form: spam trap + status message */
.form { position: relative; }
/* Spam trap: kept inside the form (not pushed off-page, which made iPhones scroll sideways to it) */
.hp { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.form-status { grid-column: 1 / -1; margin: 0; font-size: 1rem; min-height: 1.5em; }
.form-status.is-success { color: var(--gold-light); }
.form-status.is-error { color: #f0a08f; }
.form .btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- Conference talk page ---------- */
.talk-frame { align-items: center; }
.speaker-badge {
  position: relative; margin: 0; width: min(100%, 300px); justify-self: end;
  background: var(--paper); color: var(--text-on-light); border-radius: 14px;
  padding: 0 0 1.4rem; text-align: center; overflow: visible;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(201,164,84,.35);
  transform: rotate(2.5deg);
}
.badge-clip { position: absolute; top: -34px; left: 50%; width: 56px; height: 46px; transform: translateX(-50%); border: 3px solid var(--gold); border-bottom: 0; border-radius: 10px 10px 0 0; }
.badge-clip::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 26px; height: 8px; transform: translateX(-50%); background: var(--ink); border-radius: 4px; }
.badge-band { background: var(--gold-gradient); color: var(--ink); font-weight: 700; letter-spacing: .4em; text-transform: uppercase; font-size: .85rem; padding: 1.6rem 0 .8rem; border-radius: 14px 14px 0 0; }
.speaker-badge img { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; object-position: 50% 28%; margin: 1.4rem auto 1rem; border: 3px solid var(--gold); }
.speaker-badge figcaption { display: flex; flex-direction: column; gap: .3rem; padding: 0 1.25rem; }
.speaker-badge strong { font-size: 1.5rem; letter-spacing: -0.02em; }
.speaker-badge span { color: var(--muted-on-light); font-size: .95rem; }
.badge-talk { margin: .5rem 0 0; font-family: var(--font-serif); font-style: italic; color: var(--gold-deep); line-height: 1.35; }
.speaker-badge time { margin-top: .7rem; padding-top: .8rem; border-top: 1px dashed var(--line-light); font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep); }
@media (max-width: 900px) { .speaker-badge { justify-self: center; margin-top: 2.5rem; transform: rotate(1.5deg); } }

.goodies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.goodie { display: flex; flex-direction: column; gap: .75rem; padding: 1.75rem 1.5rem; background: var(--cream); border: 1px solid var(--line-light); border-radius: 10px; transition: transform .4s var(--ease), border-color .3s; }
.goodie:hover { transform: translateY(-4px); border-color: var(--gold-deep); }
.goodie-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--gold); }
.goodie h3 { font-size: 1.25rem; }
.goodie p { margin: 0; color: var(--muted-on-light); font-size: .98rem; line-height: 1.55; flex: 1; }
.goodie .text-link { align-self: flex-start; font-size: .78rem; }
.soon-pill { align-self: flex-start; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); border: 1px dashed var(--gold-deep); border-radius: 999px; padding: .45rem .8rem; white-space: nowrap; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .95rem; }
.link-list a { color: var(--gold-deep); font-weight: 500; }
.link-list span { color: var(--muted-on-light); }
@media (max-width: 1000px) { .goodies { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .goodies { grid-template-columns: 1fr; } }

.talk-reads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.talk-reads a { display: flex; gap: 1rem; align-items: center; text-decoration: none; color: inherit; padding: .75rem; border: 1px solid var(--line-light); border-radius: 10px; transition: border-color .3s, background .3s; }
.talk-reads a:hover { border-color: var(--gold-deep); background: var(--cream); }
.talk-reads img { width: 84px; height: 84px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.talk-reads span { font-weight: 600; line-height: 1.3; }
.talk-reads em { display: block; font-style: normal; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; margin-bottom: .3rem; }
@media (max-width: 900px) { .talk-reads { grid-template-columns: 1fr; } }

.social-links { display: flex; gap: 1.25rem; }
.talk-title { color: var(--text-on-dark); font-weight: 500; }
.badge-session { margin-top: .35rem; font-size: .8rem !important; font-weight: 600; letter-spacing: .08em; color: var(--text-on-light) !important; }
.goodies:has(> li:nth-child(6)) { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .goodies:has(> li:nth-child(6)) { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .goodies:has(> li:nth-child(6)) { grid-template-columns: 1fr; } }
.nowrap { white-space: nowrap; }
.talk-hero h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); max-width: 12ch; }
@media (max-width: 420px) { .talk-hero .nowrap { white-space: normal; } }
