:root {
  --cream: #fbf8d9;
  --paper: #fffdf0;
  --ink: #182114;
  --green: #55892c;
  --moss: #315d1c;
  --line: rgba(24, 33, 20, 0.2);
  --clay: #bf6238;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "Courier New", Courier, monospace; font-size: 16px; line-height: 1.45; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header, .section-wrap, footer { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.site-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 84px; border-bottom: 1px solid var(--line); }
.wordmark, .footer-name { font-size: 25px; line-height: 1; letter-spacing: 0; text-decoration: none; }
.wordmark-dot, .footer-name span { color: var(--green); }
nav { display: flex; gap: 28px; font-size: 13px; }
nav a, footer a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.owner-button { justify-self: end; border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 9px 13px; cursor: pointer; border-radius: 2px; font-size: 12px; }
.owner-button:hover { background: var(--ink); color: var(--cream); }

.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(36px, 7vw, 104px); align-items: center; min-height: 600px; padding-block: 74px; }
.eyebrow { margin: 0 0 18px; color: var(--moss); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; font-weight: bold; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-weight: 400; letter-spacing: 0; }
h1 { max-width: 680px; margin-bottom: 22px; font-size: clamp(39px, 5.1vw, 73px); line-height: 1.02; }
h2 { margin-bottom: 20px; font-size: clamp(29px, 3.3vw, 47px); line-height: 1.1; }
.hero-intro { max-width: 510px; margin-bottom: 31px; font-size: 18px; line-height: 1.55; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 28px; }
.button { border: 0; border-radius: 2px; padding: 14px 18px; text-decoration: none; font-size: 13px; cursor: pointer; line-height: 1; }
.primary { background: var(--green); color: var(--paper); }
.primary:hover { background: var(--moss); }
.text-link { font-size: 13px; text-underline-offset: 5px; }
.brand-figure { position: relative; margin: 0; height: 420px; }
.brand-figure img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.brand-figure figcaption { position: absolute; bottom: 18px; left: 20px; z-index: 1; padding: 7px 9px; background: var(--cream); font-size: 12px; }

.services { padding-block: 80px 100px; }
.section-heading { display: grid; grid-template-columns: 0.75fr 1.25fr; align-items: start; gap: 24px; margin-bottom: 42px; }
.section-heading h2 { max-width: 720px; margin: 0; }
.service-list { border-top: 1px solid var(--line); }
.service { display: grid; grid-template-columns: 68px minmax(190px, 0.8fr) minmax(230px, 1.2fr); gap: 22px; padding: 25px 0 28px; border-bottom: 1px solid var(--line); }
.service-number { color: var(--green); font-size: 13px; }
.service h3 { margin: 0; font-size: 20px; font-weight: 400; }
.service p { max-width: 520px; margin: 0; color: rgba(24, 33, 20, 0.76); }

.promise { background: var(--moss); color: var(--paper); }
.promise-inner { padding-block: 78px; }
.promise .eyebrow { color: #cbe49e; }
.promise-inner > p:last-child { max-width: 990px; margin: 0; font-size: clamp(29px, 4.2vw, 57px); line-height: 1.12; }
.gallery { padding-block: 100px; }
.gallery .section-heading { display: block; text-align: center; max-width: 740px; margin: 0 auto 42px; }
.gallery-grid { display: grid; grid-template-columns: minmax(0, 740px); justify-content: center; gap: 40px; min-height: 290px; }
.instagram-item { min-width: 0; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.instagram-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.instagram-avatar { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; background: var(--cream); }
.instagram-account { font-size: 13px; text-decoration: none; font-weight: bold; overflow-wrap: anywhere; }
.instagram-viewer { position: relative; }
.instagram-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.instagram-track::-webkit-scrollbar { display: none; }
.instagram-image { position: relative; flex: 0 0 100%; min-width: 0; aspect-ratio: 4 / 3; scroll-snap-align: start; scroll-snap-stop: always; background: #eef0e9; }
.instagram-image img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; opacity: 0; transition: opacity 280ms ease; }
.instagram-image img.is-loaded { opacity: 1; }
.instagram-counter { position: absolute; top: 14px; right: 14px; border-radius: 20px; background: rgba(24, 33, 20, 0.8); color: #fff; padding: 5px 10px; font: 12px Arial, sans-serif; pointer-events: none; }
.instagram-arrow { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 253, 240, 0.95); color: var(--ink); font: 32px Arial, sans-serif; cursor: pointer; }
.instagram-arrow--previous { left: 16px; }
.instagram-arrow--next { right: 16px; }
.instagram-arrow:disabled { opacity: 0; pointer-events: none; }
.instagram-dots { display: flex; justify-content: center; flex-wrap: wrap; padding: 3px 15px; }
.instagram-dot { display: grid; place-items: center; width: 32px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.instagram-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #b5bbae; transition: transform 180ms ease, background 180ms ease; }
.instagram-dot[aria-current="true"]::before { background: var(--green); transform: scale(1.4); }
.instagram-caption { padding: 0 20px 20px; }
.instagram-caption h3 { margin: 0 0 10px; font-size: 18px; font-weight: 400; overflow-wrap: anywhere; }
.instagram-caption p { white-space: pre-line; overflow-wrap: anywhere; font-size: 13px; margin: 0 0 14px; }
.instagram-caption a { font-size: 11px; text-underline-offset: 4px; }
.instagram-caption--single { padding-top: 20px; }
.instagram-retry { position: absolute; inset: 0; margin: auto; width: fit-content; height: 44px; padding: 0 18px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.instagram-track:focus-visible, .instagram-dot:focus-visible, .instagram-arrow:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
.gallery-status { min-height: 18px; margin: 25px 0 0; color: var(--moss); font-size: 12px; text-align: center; }
.gallery-link { display: block; width: fit-content; margin: 8px auto 0; font-size: 13px; }
.quote { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(38px, 9vw, 145px); padding-block: 108px; }
.quote-copy > p:not(.eyebrow) { max-width: 400px; font-size: 17px; }
.small-print { margin-top: 40px; color: var(--moss); font-size: 12px !important; }
.quote-form { display: grid; gap: 20px; align-content: start; }
label { display: grid; gap: 8px; font-size: 13px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); padding: 12px; color: var(--ink); outline-color: var(--green); }
textarea { resize: vertical; }
.quote-form .button { justify-self: start; margin-top: 4px; }
.form-message { min-height: 20px; margin: 0; color: var(--moss); font-size: 12px; }

footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 100px; border-top: 1px solid var(--line); font-size: 12px; }
footer p { margin: 0; }
footer a { justify-self: end; }

dialog { color: var(--ink); }
.login-dialog { width: min(420px, calc(100% - 32px)); padding: 34px; border: 1px solid var(--ink); border-radius: 2px; background: var(--paper); box-shadow: 0 18px 40px rgba(24, 33, 20, 0.18); }
.login-dialog::backdrop { background: rgba(24, 33, 20, 0.35); }
.login-dialog h2 { font-size: 34px; }
.login-dialog form { display: grid; gap: 18px; margin-top: 27px; }
.close-button { position: absolute; top: 11px; right: 13px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--ink); font-size: 27px; line-height: 1; cursor: pointer; }
.login-error { min-height: 18px; margin: 0; color: #9c2d22; font-size: 12px; }

.editor { position: fixed; z-index: 10; top: 0; right: 0; width: min(445px, 100%); height: 100dvh; background: var(--paper); border-left: 1px solid var(--ink); box-shadow: -10px 0 30px rgba(24, 33, 20, 0.14); }
.editor[hidden] { display: none; }
.editor-topbar { position: relative; display: flex; justify-content: space-between; align-items: start; padding: 28px 48px 24px 28px; border-bottom: 1px solid var(--line); }
.editor-topbar .eyebrow { margin-bottom: 8px; }
.editor-topbar h2 { margin: 0; font-size: 29px; }
.editor-scroll { height: calc(100dvh - 113px); overflow-y: auto; padding: 0 28px 36px; }
.editor-section { padding: 25px 0; border-bottom: 1px solid var(--line); }
.editor-section h3 { margin: 0 0 17px; font-size: 17px; font-weight: 400; }
.editor-section label { margin-top: 13px; }
.editor-section input[type="color"] { height: 43px; padding: 5px; cursor: pointer; }
.service-edit { display: grid; gap: 10px; padding: 15px 0 19px; border-top: 1px solid rgba(24, 33, 20, 0.1); }
.service-edit:first-child { border-top: 0; padding-top: 0; }
.editor-help { margin: 10px 0 0; color: rgba(24, 33, 20, 0.62); font-size: 11px; line-height: 1.5; }
.upload-label input { padding: 8px; }
.editor-actions { display: grid; gap: 12px; padding-top: 26px; }
.quiet { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.quiet:hover { background: rgba(24, 33, 20, 0.06); }
#save-status { min-height: 17px; margin: 0; color: var(--moss); font-size: 11px; }
body.editor-open { overflow: hidden; }
body[data-layout="image-left"] .hero-copy { order: 2; }
body[data-layout="image-left"] .brand-figure { order: 1; }
body[data-layout="stacked"] .hero { grid-template-columns: 1fr; min-height: unset; gap: 34px; }
body[data-layout="stacked"] .brand-figure { height: 315px; max-width: 650px; }

@media (max-width: 720px) {
  .site-header, .section-wrap, footer { width: min(100% - 32px, 1160px); }
  .site-header { grid-template-columns: 1fr auto; min-height: 72px; }
  nav { display: none; }
  .wordmark { font-size: 22px; }
  .owner-button { padding: 8px 10px; }
  .hero { grid-template-columns: 1fr; gap: 35px; min-height: unset; padding-block: 49px 58px; }
  .hero-copy { order: 1 !important; }
  .brand-figure { order: 2 !important; height: 290px; }
  h1 { font-size: clamp(38px, 11vw, 54px); }
  .hero-intro { font-size: 16px; }
  .section-heading, .quote { grid-template-columns: 1fr; }
  .section-heading { gap: 0; }
  .services { padding-block: 63px 72px; }
  .gallery { padding-block: 72px; }
  .gallery-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; min-height: 0; }
  .instagram-header { padding: 13px 14px; }
  .instagram-caption { padding-inline: 14px; }
  .instagram-arrow { display: none; }
  .instagram-image { aspect-ratio: 1; }
  .service { grid-template-columns: 40px 1fr; gap: 9px 14px; }
  .service p { grid-column: 2; }
  .promise-inner { padding-block: 58px; }
  .quote { gap: 28px; padding-block: 72px; }
  footer { grid-template-columns: 1fr auto; gap: 12px; padding-block: 22px; min-height: unset; }
  footer p:nth-child(2) { grid-row: 2; }
  footer a { grid-column: 2; grid-row: 1 / span 2; }
}

@media (prefers-reduced-motion: reduce) {
  .instagram-image img, .instagram-dot::before { transition: none; }
}
