:root {
  --espresso: #251a14;
  --espresso-2: #34241a;
  --ink: #2d241e;
  --copper: #a55d27;
  --copper-light: #c98548;
  --cream: #f5efe5;
  --paper: #fbf8f2;
  --line: rgba(45, 36, 30, 0.18);
  --shell: min(1180px, calc(100% - 48px));
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell { width: var(--shell); margin-inline: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: white;
  background: var(--copper);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  color: #fffaf2;
  background: rgba(37, 26, 20, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
  transition: box-shadow 180ms ease, background 180ms ease;
}
.site-header.scrolled { background: rgba(37, 26, 20, 0.98); box-shadow: 0 12px 30px rgba(24, 13, 7, 0.18); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1; }
.brand-main { font: 500 20px/1 var(--serif); letter-spacing: 0.2em; }
.brand-sub { margin-top: 7px; color: var(--copper-light); font-size: 9px; font-weight: 700; letter-spacing: 0.45em; }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a { position: relative; color: rgba(255, 250, 242, 0.82); font-size: 14px; font-weight: 600; letter-spacing: 0.05em; text-decoration: none; }
.main-nav a:not(.nav-call)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: var(--copper-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); }
.main-nav .nav-call { padding: 10px 16px; color: #fff; border: 1px solid rgba(201, 133, 72, 0.65); }
.menu-toggle { display: none; }

.hero {
  position: relative;
  min-height: 780px;
  padding: 176px 0 46px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(165, 93, 39, 0.06), transparent 42%),
    radial-gradient(circle at 83% 16%, rgba(201, 133, 72, 0.12), transparent 27%),
    var(--cream);
}
.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -330px;
  top: 110px;
  border: 1px solid rgba(165, 93, 39, 0.18);
  transform: rotate(45deg);
}
.hero-rule { position: absolute; top: 82px; bottom: 0; left: calc(50% - 1px); width: 1px; background: rgba(45, 36, 30, 0.08); }
.hero-grid { position: relative; display: grid; grid-template-columns: 0.92fr 1.08fr; align-items: center; gap: clamp(48px, 7vw, 100px); }
.eyebrow { margin-bottom: 22px; color: var(--copper); font-size: 13px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; }
.hero h1 { margin-bottom: 28px; font: 400 clamp(48px, 6vw, 78px)/1.03 var(--serif); letter-spacing: -0.045em; }
.hero h1 em, .contact h2 em { color: var(--copper); font-weight: 400; }
.hero-lead { max-width: 570px; margin-bottom: 34px; color: #5c5047; font-size: 18px; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border: 1px solid transparent; font-size: 14px; font-weight: 800; letter-spacing: 0.05em; text-decoration: none; transition: transform 180ms ease, background 180ms ease, color 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--espresso); border-color: var(--espresso); }
.button-primary:hover { background: var(--copper); border-color: var(--copper); }
.text-link { color: var(--ink); font-size: 14px; font-weight: 800; text-underline-offset: 7px; text-decoration-color: rgba(45, 36, 30, 0.35); }
.text-link span { margin-left: 7px; color: var(--copper); }
.hero-mark { position: relative; padding: 48px 28px 38px; text-align: center; }
.hero-mark::before, .hero-mark::after {
  content: "";
  position: absolute;
  width: 64px;
  height: 64px;
  border-color: rgba(165, 93, 39, 0.4);
}
.hero-mark::before { top: 0; left: 0; border-top: 1px solid; border-left: 1px solid; }
.hero-mark::after { right: 0; bottom: 0; border-right: 1px solid; border-bottom: 1px solid; }
.truss-wrap { display: flex; align-items: flex-end; min-height: 210px; }
.truss-wrap img { width: 100%; height: auto; filter: drop-shadow(0 16px 15px rgba(56, 29, 11, 0.12)); }
.hero-wordmark { margin-top: 18px; padding-top: 22px; border-top: 1px solid rgba(45, 36, 30, 0.28); }
.hero-wordmark span { display: block; font: 400 clamp(46px, 5.4vw, 74px)/0.96 var(--serif); letter-spacing: 0.14em; }
.hero-wordmark small { display: block; margin-top: 14px; color: #6d401f; font-size: 18px; letter-spacing: 0.46em; }
.hero-mark > p { margin: 20px 0 0; color: #7c6757; font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.hero-mark > p i { display: inline-block; width: 3px; height: 3px; margin: 0 10px 3px; background: var(--copper); border-radius: 50%; }
.hero-footer { position: relative; display: flex; align-items: center; gap: 16px; margin-top: 66px; color: #7c6757; font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.hero-footer-line { width: 60px; height: 1px; background: var(--copper); }

.section { padding: 112px 0; }
.section-heading { display: grid; grid-template-columns: 1.1fr 0.75fr; align-items: end; gap: 80px; margin-bottom: 62px; }
.section-heading h2, .craft-copy h2, .process h2 { margin: 0; font: 400 clamp(40px, 5vw, 62px)/1.07 var(--serif); letter-spacing: -0.035em; }
.section-heading > p { margin: 0 0 8px; color: #6a5e55; font-size: 17px; }
.service-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service-card { position: relative; min-height: 350px; padding: 30px 26px 36px; overflow: hidden; background: var(--paper); }
.service-number { color: var(--copper); font: italic 18px/1 var(--serif); }
.service-card h3 { margin: 100px 0 16px; font: 400 27px/1.2 var(--serif); }
.service-card p { margin-bottom: 0; color: #71645a; }
.card-line { position: absolute; top: 74px; right: -50px; width: 170px; height: 12px; border-top: 2px solid rgba(165, 93, 39, 0.32); border-bottom: 1px solid rgba(165, 93, 39, 0.18); transform: rotate(-32deg); }
.services-note { margin: 28px 0 0; text-align: right; color: #6a5e55; font-size: 14px; }
.services-note a { color: var(--copper); font-weight: 800; text-underline-offset: 4px; }

.craft { color: #f7efe5; background: var(--espresso); }
.craft-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; align-items: center; gap: clamp(60px, 9vw, 132px); }
.craft-panel { position: relative; aspect-ratio: 0.9; overflow: hidden; border: 1px solid rgba(201, 133, 72, 0.35); background: linear-gradient(145deg, #3d2a1d, #1f1510); }
.craft-panel::before { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(255, 255, 255, 0.08); }
.craft-panel span { position: absolute; z-index: 2; inset: 50% auto auto 50%; color: rgba(255, 244, 228, 0.85); font: 400 52px/1 var(--serif); letter-spacing: 0.18em; transform: translate(-46%, -50%); }
.beam { position: absolute; height: 58px; background: linear-gradient(90deg, #7b421f, #b46931 52%, #74401f); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 18px 25px rgba(0, 0, 0, 0.22); }
.beam::after { content: ""; position: absolute; inset: 9px 0 auto; height: 1px; background: rgba(255, 233, 205, 0.17); }
.beam-a { width: 130%; top: 18%; left: -14%; transform: rotate(43deg); }
.beam-b { width: 130%; top: 18%; right: -14%; transform: rotate(-43deg); }
.beam-c { width: 95%; bottom: 19%; left: 2.5%; }
.craft-copy .eyebrow { color: var(--copper-light); }
.craft-copy h2 { margin-bottom: 34px; }
.large-copy { max-width: 650px; color: rgba(247, 239, 229, 0.7); font-size: 19px; line-height: 1.8; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 48px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.principles div { padding: 22px 12px 0 0; }
.principles span { display: block; margin-bottom: 8px; color: var(--copper-light); font: italic 15px/1 var(--serif); }
.principles strong { font-size: 14px; letter-spacing: 0.11em; text-transform: uppercase; }

.process { background: #eee4d5; }
.process-heading { margin-bottom: 48px; }
.process-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(45, 36, 30, 0.25); }
.process-list li { display: grid; grid-template-columns: 90px 1fr; gap: 28px; padding: 34px 0; border-bottom: 1px solid rgba(45, 36, 30, 0.25); }
.process-list > li > span { color: var(--copper); font: italic 22px/1.3 var(--serif); }
.process-list h3 { margin-bottom: 8px; font: 400 27px/1.2 var(--serif); }
.process-list p { max-width: 690px; margin: 0; color: #6a5e55; }

.contact { position: relative; padding: 112px 0; overflow: hidden; color: white; background: var(--espresso-2); }
.contact::after { content: "ARS"; position: absolute; right: -24px; bottom: -80px; color: rgba(255, 255, 255, 0.025); font: 400 260px/1 var(--serif); letter-spacing: -0.08em; }
.contact-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 90px; }
.eyebrow-light { color: var(--copper-light); }
.contact h2 { margin: 0; font: 400 clamp(45px, 5vw, 68px)/1.06 var(--serif); letter-spacing: -0.04em; }
.contact-card { padding: 38px; color: var(--ink); background: var(--cream); border-top: 4px solid var(--copper); }
.contact-card > p { margin-bottom: 5px; color: #7c6c60; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.contact-card h3 { margin-bottom: 0; font: 400 28px/1.25 var(--serif); }
.contact-card > span { color: var(--copper); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.contact-links { margin: 28px 0; border-top: 1px solid var(--line); }
.contact-links a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.contact-links small { display: block; color: #84766b; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.contact-links strong { display: block; margin-top: 3px; font-size: 17px; overflow-wrap: anywhere; }
.button-light { width: 100%; color: white; background: var(--espresso); }
.button-light:hover { background: var(--copper); }
.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-actions .button { width: 100%; padding-inline: 14px; }
.button-whatsapp { color: white; background: #1f6f4a; }
.button-whatsapp:hover { background: #185b3d; }

.site-footer { padding: 34px 0; color: rgba(255, 250, 242, 0.72); background: #1b120e; }
.footer-grid { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 44px; }
.brand-footer { align-items: flex-start; color: white; }
.site-footer p { margin: 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

:focus-visible { outline: 3px solid #e9a669; outline-offset: 4px; }

@media (max-width: 1120px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card { min-height: 280px; }
  .service-card:nth-child(5) { grid-column: 1 / -1; min-height: 230px; }
  .service-card h3 { margin-top: 62px; }
}

@media (max-width: 960px) {
  :root { --shell: min(100% - 40px, 760px); }
  .menu-toggle { display: grid; place-content: center; gap: 5px; width: 46px; height: 46px; padding: 0; color: white; background: transparent; border: 1px solid rgba(255, 255, 255, 0.22); }
  .menu-toggle span:not(.sr-only) { display: block; width: 20px; height: 1px; background: currentColor; transition: transform 180ms ease, opacity 180ms ease; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .main-nav { position: absolute; top: 82px; right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 18px 20px 26px; background: var(--espresso); border-top: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; }
  .main-nav .nav-call { margin-top: 9px; text-align: center; }
  .hero { padding-top: 144px; }
  .hero-rule { display: none; }
  .hero-grid, .section-heading, .craft-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 68px; }
  .hero-mark { width: min(620px, 100%); margin: 0 auto; }
  .section-heading { align-items: start; gap: 24px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card, .service-card:nth-child(5) { grid-column: auto; min-height: 230px; }
  .service-card h3 { margin-top: 52px; }
  .craft-panel { width: min(500px, 100%); }
  .contact-grid { gap: 54px; }
  .contact-card { max-width: 600px; }
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 600px) {
  :root { --shell: calc(100% - 32px); }
  .header-inner { min-height: 72px; }
  .main-nav { top: 72px; }
  .brand-main { font-size: 17px; }
  .hero { min-height: auto; padding: 122px 0 34px; }
  .hero h1 { font-size: clamp(42px, 13vw, 58px); }
  .hero-lead { font-size: 17px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 18px; }
  .button { width: 100%; }
  .text-link { text-align: center; }
  .hero-mark { padding: 32px 12px 28px; }
  .truss-wrap { min-height: 120px; }
  .hero-wordmark span { font-size: clamp(36px, 11vw, 52px); letter-spacing: 0.1em; }
  .hero-wordmark small { font-size: 13px; letter-spacing: 0.34em; }
  .hero-mark > p { font-size: 9px; letter-spacing: 0.12em; }
  .hero-mark > p i { margin-inline: 5px; }
  .hero-footer { margin-top: 44px; font-size: 10px; }
  .section { padding: 78px 0; }
  .section-heading h2, .craft-copy h2, .process h2 { font-size: 39px; }
  .service-card { padding: 28px; }
  .services-note { text-align: left; }
  .principles { grid-template-columns: 1fr; }
  .principles div { padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
  .process-list li { grid-template-columns: 50px 1fr; gap: 14px; }
  .contact { padding: 78px 0; }
  .contact h2 { font-size: 43px; }
  .contact-card { padding: 28px 22px; }
}

/* A warmer editorial rhythm, with generous photographs of each service. */
.hero-mark { background: rgba(255, 252, 246, 0.55); border-radius: 4px 64px 4px 4px; box-shadow: 0 24px 64px rgba(88, 52, 26, 0.07); }
.hero-mark::before, .hero-mark::after { display: none; }
.hero-lead { color: #55473c; }
.button { border-radius: 4px; }
.services { background: #fcf9f3; }
.service-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; gap: 28px; background: none; border: 0; }
.service-card, .service-card:nth-child(5) { grid-column: span 2; min-height: 0; padding: 0 0 28px; border: 1px solid #e6dbcd; border-radius: 5px; background: #fffdf9; box-shadow: 0 8px 28px rgba(65, 39, 21, 0.035); }
.service-card:nth-child(-n+2) { grid-column: span 3; }
.service-image { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 26px; border-bottom: 1px solid #e6dbcd; }
.service-photo-full { position: relative; width: 100%; aspect-ratio: 3 / 2; margin: 0 0 26px; overflow: hidden; border-bottom: 1px solid #e6dbcd; background: #eee8df; }
.service-photo-full img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.service-photo-pergola img { top: -30.696203%; height: 162.025316%; }
.service-diptych { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); aspect-ratio: 3 / 2; margin: 0 0 26px; border-bottom: 1px solid #e6dbcd; }
.service-diptych-pane { position: relative; min-width: 0; overflow: hidden; }
.service-diptych-pane img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.service-diptych-xlam { object-position: 22% 50%; }
.service-diptych { position: relative; }
.image-badge { position: absolute; z-index: 3; right: 12px; bottom: 12px; padding: 6px 9px; color: #fffaf2; background: rgba(37, 26, 20, 0.86); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 3px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; line-height: 1.2; text-transform: uppercase; backdrop-filter: blur(5px); }
.service-number { display: block; margin: 0 26px 12px; font-size: 17px; }
.service-card h3 { margin: 0 26px 14px; font-size: clamp(26px, 2.6vw, 32px); }
.service-card p { margin: 0 26px; color: #625348; font-size: 16px; line-height: 1.7; }
.card-line { display: none; }
.image-disclosure { margin: 24px 0 0; color: #76675b; font-size: 14px; line-height: 1.6; }
.services-note { padding-top: 22px; border-top: 1px solid var(--line); text-align: left; font-size: 16px; }
.craft { background: #302219; }
.craft-grid { grid-template-columns: 1fr 1.1fr; gap: 80px; }
.craft-photo { position: relative; margin: 0; border-radius: 4px 48px 4px 4px; overflow: hidden; }
.craft-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.craft-photo figcaption { position: absolute; inset: auto 0 0; padding: 60px 26px 24px; background: linear-gradient(transparent, rgba(25, 16, 11, 0.92)); color: #fff9ed; font: 400 27px/1.25 var(--serif); }
.craft-photo small { display: block; margin-top: 12px; font: 400 13px/1.5 var(--sans); }
.large-copy { color: #dfd3c6; }
.process { background: #f1e8dc; }
.contact-card { border-radius: 5px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12); }
section[id] { scroll-margin-top: 96px; }
@media (max-width: 960px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .service-card, .service-card:nth-child(-n+2), .service-card:nth-child(5) { grid-column: auto; }
  .craft-grid { grid-template-columns: 1fr; gap: 40px; }
  .craft-photo { max-width: 620px; }
  .craft-photo img { aspect-ratio: 4 / 3; object-position: center 62%; }
}
@media (max-width: 600px) {
  .service-grid { grid-template-columns: 1fr; gap: 28px; }
  .service-card, .service-card:nth-child(5) { padding: 0 0 26px; }
  .service-card h3 { margin-top: 0; }
  .service-image { margin-bottom: 22px; }
  .service-photo-full { margin-bottom: 22px; }
  .service-diptych { margin-bottom: 22px; }
  .hero-mark { border-top-right-radius: 40px; }
  .contact-actions { grid-template-columns: 1fr; }
}

/* Real-work portfolio: an editorial gallery built around unfiltered site photography. */
.portfolio {
  color: #f8f0e5;
  background:
    linear-gradient(135deg, rgba(201, 133, 72, 0.09), transparent 38%),
    #2d2018;
}
.portfolio .eyebrow { color: var(--copper-light); }
.portfolio-heading { margin-bottom: 48px; }
.portfolio-heading h2 { color: #fff9ef; }
.portfolio-heading > p { color: rgba(248, 240, 229, 0.72); }
.project-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}
.project-card {
  position: relative;
  grid-column: span 4;
  min-height: 350px;
  padding: 0;
  overflow: hidden;
  color: white;
  font-family: var(--sans);
  text-align: left;
  background: #18100c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px 34px 4px 4px;
  cursor: pointer;
  isolation: isolate;
}
.project-card--wide { grid-column: span 7; min-height: 455px; }
.project-card--narrow { grid-column: span 5; min-height: 455px; }
.project-card > img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease;
}
.project-card--portrait > img { object-position: center 46%; }
.project-card--facade > img { object-position: center 42%; }
.project-card-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 9, 5, 0.04) 20%, rgba(16, 9, 5, 0.3) 58%, rgba(16, 9, 5, 0.9) 100%);
}
.project-card-copy {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 16px;
  padding: 82px 26px 24px;
}
.project-card-number {
  align-self: center;
  color: var(--copper-light);
  font: italic 18px/1 var(--serif);
}
.project-card-copy strong {
  font: 400 clamp(25px, 2.5vw, 34px)/1.08 var(--serif);
  text-wrap: balance;
}
.project-card-copy small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.project-card-copy i { margin-left: 6px; color: var(--copper-light); font-style: normal; font-size: 17px; }
.project-card:hover > img { transform: scale(1.025); }
.project-card:hover .project-card-copy small,
.project-card:focus-visible .project-card-copy small { color: #fff; }
.portfolio-note {
  max-width: 720px;
  margin: 28px 0 0;
  color: rgba(248, 240, 229, 0.62);
  font-size: 14px;
}

.gallery-dialog {
  width: min(1280px, calc(100% - 40px));
  max-width: none;
  height: min(850px, calc(100dvh - 40px));
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--sans);
  background: transparent;
  border: 0;
}
.gallery-dialog::backdrop {
  background: rgba(18, 11, 7, 0.86);
  backdrop-filter: blur(8px);
}
.gallery-window {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  border-radius: 5px 42px 5px 5px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
}
.gallery-close {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0 0 3px;
  color: white;
  background: rgba(37, 26, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  font: 300 30px/1 var(--sans);
  cursor: pointer;
}
.gallery-stage {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  min-width: 0;
  padding: 24px 0;
  background: #17100c;
}
.gallery-figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  height: 100%;
  margin: 0;
}
.gallery-figure img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.gallery-figure figcaption {
  min-height: 44px;
  padding: 14px 12px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}
.gallery-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: auto;
  padding: 0;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}
.gallery-arrow:hover { background: var(--copper); }
.gallery-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 64px 28px 26px;
  overflow-y: auto;
  background: var(--paper);
}
.gallery-panel .eyebrow { margin-bottom: 14px; }
.gallery-panel h2 { margin-bottom: 18px; font: 400 36px/1.08 var(--serif); }
.gallery-panel > p:not(.eyebrow):not(.gallery-counter) { color: #6a5e55; font-size: 15px; line-height: 1.65; }
.gallery-counter { margin: auto 0 15px; padding-top: 24px; color: var(--copper); font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.gallery-thumbnail {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  background: #ded6cb;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}
.gallery-thumbnail[aria-pressed="true"] { border-color: var(--copper); }
.gallery-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.gallery-open { overflow: hidden; }

@media (max-width: 960px) {
  .project-card,
  .project-card--wide,
  .project-card--narrow { grid-column: span 6; min-height: 360px; }
  .project-card:last-child { grid-column: 4 / span 6; }
  .gallery-window { grid-template-columns: minmax(0, 1fr) 290px; }
  .gallery-stage { grid-template-columns: 54px minmax(0, 1fr) 54px; }
  .gallery-panel { padding-inline: 22px; }
}

@media (max-width: 700px) {
  .portfolio-heading { margin-bottom: 36px; }
  .project-grid { gap: 16px; }
  .project-card,
  .project-card--wide,
  .project-card--narrow,
  .project-card:last-child { grid-column: 1 / -1; min-height: 330px; }
  .project-card-copy { grid-template-columns: auto 1fr; padding: 72px 20px 20px; }
  .project-card-copy small { grid-column: 2; }
  .gallery-dialog { width: calc(100% - 16px); height: calc(100dvh - 16px); }
  .gallery-window { display: block; overflow-y: auto; border-radius: 4px 24px 4px 4px; }
  .gallery-stage { grid-template-columns: 46px minmax(0, 1fr) 46px; height: min(62dvh, 560px); padding: 52px 0 14px; }
  .gallery-arrow { width: 38px; height: 38px; }
  .gallery-figure figcaption { padding-inline: 4px; font-size: 12px; }
  .gallery-panel { display: block; padding: 28px 20px 24px; overflow: visible; }
  .gallery-panel h2 { font-size: 32px; }
  .gallery-counter { margin-top: 22px; }
  .gallery-thumbnails { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
