:root {
  --ink: #272c31;
  --paper: #fffaf4;
  --accent: #f39a60;
  --terracotta: #91411f;
  --rule: #272c3126;
  --edge: max(5%, calc((100% - 1320px) / 2));
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 Arial, sans-serif; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 4px; }
img { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
h1, h2 { font-family: Georgia, serif; font-weight: 400; letter-spacing: -.04em; margin: 0 0 .35em; line-height: 1.06; }
h1 { font-size: clamp(2.75rem, 5.4vw, 5.25rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.5rem); }
h3 { line-height: 1.25; margin: 0 0 .6em; }

body > header, footer { padding: 14px var(--edge); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
body > header { border-bottom: 1px solid var(--rule); }
.brand img { width: clamp(105px, 16vw, 174px); height: auto; }
header nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); }
header nav a { font-size: .875rem; text-decoration: none; }
header nav a:hover, .hero-link:hover, .back-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 19px; border-radius: 4px; background: var(--ink); color: white; font: 700 .875rem/1.3 Arial, sans-serif; text-decoration: none; }
.button:hover { background: #3d464e; }
.button.gold { background: var(--accent); color: #211b17; }
.button.gold:hover { background: #ffb784; }
footer { border-top: 1px solid var(--rule); font-size: .81rem; padding-block: 22px; }

.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 5vw, 76px); padding: clamp(35px, 5vw, 72px) var(--edge); background: radial-gradient(ellipse at right top, #414950, transparent 68%), var(--ink); color: var(--paper); }
.hero a:focus-visible { outline-color: var(--accent); }
.eyebrow { text-transform: uppercase; letter-spacing: .17em; font-size: .75rem; color: var(--accent); font-weight: 700; margin-bottom: 19px; }
.hero h1 { max-width: 13ch; }
.hero-summary { max-width: 45ch; color: #f0e2d8; font-size: clamp(1rem, 1.4vw, 1.16rem); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 15px 24px; margin-top: 27px; }
.hero-link { font-size: .92rem; text-decoration: none; padding: 9px 0; }
.hero-link span { margin-left: 5px; color: var(--accent); }
.hero-project { position: relative; display: block; min-width: 0; text-decoration: none; border: 1px solid #f8eadd50; border-radius: 5px; overflow: hidden; }
.hero-project img { width: 100%; height: auto; aspect-ratio: 1.2; object-fit: cover; }
.hero-project > span { position: absolute; inset: auto 0 0; display: block; color: white; background: linear-gradient(transparent, #171717eb); padding: 38px 18px 15px; font-size: .81rem; }
.hero-project strong { display: flex; justify-content: space-between; gap: 12px; font: 400 1.5rem/1.2 Georgia, serif; }
.hero-project strong span { color: #ffd4b4; }
.hero-project:hover strong { text-decoration: underline; text-underline-offset: 4px; }

main > section { padding: clamp(42px, 6vw, 80px) var(--edge); }
.gallery-index h2 { margin-bottom: .65em; }
.gallery-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); }
.gallery-card { display: grid; grid-template-rows: auto 1fr; text-decoration: none; border: 1px solid var(--rule); background: #fff; border-radius: 4px; overflow: hidden; }
.gallery-card img { width: 100%; height: auto; aspect-ratio: 1.65; object-fit: cover; }
.gallery-card > span { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px; min-height: 57px; font-weight: 700; line-height: 1.3; }
.gallery-card span span { color: var(--terracotta); }
.gallery-card:hover { border-color: var(--terracotta); box-shadow: 0 5px 16px #43230d16; }
.gallery-card:hover > span { text-decoration: underline; text-underline-offset: 3px; }
.gallery-card-kitchens { position: relative; grid-column: span 2; grid-template-rows: minmax(0, 1fr) auto; }
.gallery-card-kitchens img { position: absolute; grid-area: 1 / 1; inset: 0; height: 100%; object-position: 50% 55%; }
.gallery-card-kitchens > span { grid-row: 2; position: relative; background: white; }

#services { background: #f4ece3; }
.intro { max-width: 60ch; }
.grid, .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 36px); margin-top: 26px; }
.service { border-top: 2px solid #cc8254; padding: 16px 0 0; }
.service p, .steps p { margin-bottom: 0; }
.process .steps article { background: #f4ece3; border-radius: 4px; padding: 20px; }
.contact { background: #f4ece3; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 65px); }
.contact p { max-width: 53ch; }
.contact-box { background: #fff; border: 1px solid var(--rule); padding: clamp(20px, 4vw, 35px); align-self: start; }
.contact-box a { display: block; margin-bottom: 14px; overflow-wrap: anywhere; }
.contact-box .button { display: inline-flex; margin: 6px 0 0; }

.gallery-page { padding: clamp(35px, 5vw, 65px) var(--edge); }
.gallery-heading h1 { margin-top: 14px; }
.back-link { font-weight: 700; color: var(--terracotta); }
.gallery-nav { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 12px 22px; border-bottom: 1px solid var(--rule); }
.gallery-nav a { background: #f4ece3; border: 1px solid var(--rule); min-height: 44px; padding: 9px 14px; border-radius: 4px; text-decoration: none; }
.gallery-nav a:hover { border-color: var(--terracotta); text-decoration: underline; }
.gallery-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.project-category, .project-photo { margin-top: 44px; scroll-margin-top: 20px; }
.project-category h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); margin-bottom: 14px; }
.project-category h3 { margin-top: 24px; }
.project-grid, .project-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.project-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-grid-wide { grid-template-columns: 1fr; }
.project-grid figure { margin: 0; }
.project-grid figcaption { padding-top: 6px; font-size: .875rem; }
.project-grid a, .project-photo a { display: block; border-radius: 4px; overflow: hidden; }
.project-grid img, .project-photo img { width: 100%; height: auto; }
.project-photo { max-width: 940px; margin-inline: 0; }
.project-photo figcaption { margin-top: 14px; }
.project-photo h3 { display: inline-block; margin-right: 12px; }
.project-status { background: #fce8d9; color: var(--terracotta); padding: 4px 9px; font-size: .85rem; }
.project-details { margin-top: 14px; }
.project-detail-wide { grid-column: 1/-1; }
.past-work { margin-top: 44px; border-top: 1px solid var(--rule); padding-top: 18px; }
.past-work .project-category:first-of-type { margin-top: 18px; }
.gallery-bottom { margin-top: 42px; display: flex; flex-wrap: wrap; align-items: center; gap: 15px 22px; }

@media (max-width: 850px) {
  .gallery-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-card-kitchens { grid-column: auto; grid-template-rows: auto 1fr; }
  .gallery-card-kitchens img { position: static; aspect-ratio: 1.65; height: auto; }
}
@media (max-width: 680px) {
  header nav a:not(.button) { display: none; }
  .hero, .contact { grid-template-columns: 1fr; }
  .hero h1 { max-width: 17ch; }
  .hero-project img { aspect-ratio: 1.55; }
  .grid, .steps { grid-template-columns: 1fr; }
  .project-grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { align-items: start; flex-direction: column; gap: 6px; }
}
@media (max-width: 420px) {
  .gallery-card > span { padding: 9px; font-size: .9rem; }
  .project-grid, .project-details { grid-template-columns: 1fr; }
}
