/* Greinton Somerset Filming Location: brand palette taken from the supplied swatches */
:root {
  --cream:      #EDE1D4;
  --sage-grey:  #979890;
  --mist:       #B9BEC1;
  --linen:      #EDEAE4;
  --sand:       #CEC2AE;
  --slate:      #646D73;
  --pale-sage:  #BBBCB0;
  --taupe:      #877E73;
  --aubergine:  #4B3239;

  --bg: var(--linen);
  --surface: var(--cream);
  --ink: #2E2729;          /* deepened aubergine for body text */
  --ink-soft: #565E64;     /* deepened slate; passes AA on linen and cream */
  --accent: var(--aubergine);
  --line: #D6CFC4;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--aubergine); line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(3rem, 8vw, 5.5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
.eyebrow { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .8em; font-weight: 500; }
.note { font-size: .85rem; color: var(--ink-soft); margin-top: 1rem; }
.sub { color: var(--ink-soft); max-width: 60ch; }

/* Draft placeholder text that still needs real details */
.todo { background: rgba(206,194,174,.45); border-bottom: 1px dashed var(--taupe); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 14px var(--gutter); background: rgba(237,234,228,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--aubergine); text-decoration: none; margin: 0; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: .9rem; }
.nav a:not(.btn):hover { color: var(--accent); }

/* Buttons */
.btn { display: inline-block; background: var(--aubergine); color: var(--linen) !important; border: 1px solid var(--aubergine);
  padding: .85em 1.6em; border-radius: 2px; text-decoration: none; font: 500 .9rem var(--sans); letter-spacing: .03em; cursor: pointer; }
.btn:hover { background: #3a262c; }
.btn-ghost { background: transparent; color: var(--aubergine) !important; }
.btn-ghost:hover { background: var(--cream); }
.btn-small { padding: .55em 1.1em; }
:focus-visible { outline: 2px solid var(--aubergine); outline-offset: 3px; }

/* Placeholder image slots: replaced by real photos once they're added */
.ph { position: relative; background: var(--ph, var(--sand)); overflow: hidden; }
.ph::after { content: attr(data-label); position: absolute; inset: auto 12px 12px 12px; font-size: .75rem; letter-spacing: .06em;
  color: rgba(255,255,255,.9); text-transform: uppercase; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph:has(img)::after { content: none; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 78vh; }
.hero-media { min-height: 360px; --ph: var(--taupe); }
.hero-text { padding: clamp(32px, 6vw, 80px) var(--gutter); align-self: center; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* Facts strip */
.facts { background: var(--aubergine); color: var(--cream); padding: 22px var(--gutter); }
.facts dl { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.facts dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--pale-sage); }
.facts dd { margin: .3rem 0 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; font-variant-numeric: lining-nums; }
.facts dl > div { border-left: 1px solid rgba(237,225,212,.18); padding-left: 1rem; }
.facts dl > div:first-child { border-left: 0; padding-left: 0; }
.facts .todo { background: rgba(255,255,255,.12); border-bottom-color: var(--sand); }

/* Sections */
.section { padding: clamp(56px, 9vw, 110px) var(--gutter); }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section.alt { background: var(--cream); }
.section-head { margin-bottom: 2.2rem; }

.overview { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; align-items: start; }
.overview > * { max-width: none; margin: 0; }
.col-text p { max-width: 62ch; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-content: flex-start; }
.tags li { border: 1px solid var(--sage-grey); padding: .4em .9em; border-radius: 99px; font-size: .85rem; color: var(--ink); background: var(--linen); }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.filter { background: none; border: 1px solid var(--line); padding: .45em 1em; border-radius: 99px; font: 500 .85rem var(--sans); color: var(--ink); cursor: pointer; }
.filter.is-active, .filter:hover { background: var(--aubergine); color: var(--linen); border-color: var(--aubergine); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 240px; gap: 10px; }
.gallery figure { margin: 0; cursor: zoom-in; }
.gallery figure.wide { grid-column: span 2; }
.gallery figure.tall { grid-row: span 2; }
.gallery figure[hidden] { display: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(30,24,26,.92); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox-inner { width: min(1100px, 100%); }
.lightbox .ph { aspect-ratio: 3/2; }
.lightbox p { color: var(--cream); text-align: center; margin-top: .8rem; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--cream); font-size: 2rem; cursor: pointer; padding: 12px; }
.lb-close { top: 10px; right: 16px; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
.lb-plan { width: 100%; max-height: 82vh; object-fit: contain; background: #fff; padding: 12px; }
.lb-prev { left: 8px; top: 50%; } .lb-next { right: 8px; top: 50%; }

/* Spaces & practical */
.spaces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem 2rem; }
.spaces article { border-top: 1px solid var(--taupe); padding-top: 1rem; }
.practical { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.practical > div { padding: 1.4rem 1.4rem 1.2rem 0; border-bottom: 1px solid var(--line); }
.practical h3 { font-size: 1.2rem; }
.practical p, .spaces p { font-size: .93rem; color: var(--ink-soft); }

.dim { font-size: .8rem !important; letter-spacing: .04em; color: var(--taupe) !important; margin-bottom: .5em; }
.spaces-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 3rem; align-items: start; }
.spaces-wrap .spaces { grid-template-columns: repeat(3, 1fr); }
.floorplan { margin: 0; background: #fff; padding: 1rem; position: sticky; top: 90px; }
.floorplan figcaption { font-size: .8rem; color: var(--ink-soft); margin-top: .6rem; }
@media (max-width: 960px) { .spaces-wrap { grid-template-columns: 1fr; } .floorplan { position: static; max-width: 420px; } }
@media (max-width: 760px) { .spaces-wrap .spaces { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .spaces-wrap .spaces { grid-template-columns: 1fr; } }

/* Location */
.location { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.travel { width: 100%; border-collapse: collapse; margin-top: 1.4rem; font-size: .93rem; }
.travel caption { text-align: left; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); padding-bottom: .5rem; }
.travel th, .travel td { padding: .6rem 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.travel td { text-align: right; color: var(--ink-soft); white-space: nowrap; padding-left: 1rem; }
#map { display: block; width: 100%; height: 440px; border: 0; border-radius: 2px; background: var(--mist); }

/* Booking */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: s; }
.steps li { counter-increment: s; }
.steps li::before { content: "0" counter(s); font-family: var(--serif); font-size: 2.4rem; color: var(--sage-grey); display: block; line-height: 1; margin-bottom: .4rem; }
.steps p { font-size: .93rem; color: var(--ink-soft); }
.rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
.rates > div { background: var(--cream); padding: 1.6rem; }
.rates p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--taupe); padding: 1rem 0; }
.faq summary { cursor: pointer; font-family: var(--serif); font-size: 1.3rem; color: var(--aubergine); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: "+"; font-family: var(--sans); }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: .7rem 0 0; color: var(--ink-soft); max-width: 70ch; }

/* Enquiry form */
.enquire { display: grid; grid-template-columns: 1fr 1.8fr; gap: 3rem; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.enquire > * { max-width: none; margin: 0; }
.form { display: grid; gap: 1rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 500; color: var(--ink); }
.form input, .form select, .form textarea { font: 400 1rem var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 2px; padding: .7em .8em; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--aubergine); outline-offset: 0; border-color: var(--aubergine); }
.form select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.6em;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234B3239' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 1em center / 12px 8px; }
.form .invalid { border-color: #9b2c2c; }
.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.checks legend { font-size: .85rem; font-weight: 500; margin-bottom: .4rem; padding: 0; }
.checks label { display: flex; align-items: center; gap: .45rem; font-weight: 400; }
.checks input { width: auto; }
.form .btn { justify-self: start; }
.form-status { min-height: 1.5em; font-size: .95rem; margin: 0; }
.form-status.ok { color: #3c5a3e; } .form-status.err { color: #9b2c2c; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Footer */
.site-footer { background: var(--aubergine); color: var(--cream); text-align: center; padding: 48px var(--gutter); }
.site-footer .brand { color: var(--cream); margin-bottom: .4rem; }
.site-footer p { margin: .2rem 0; font-size: .9rem; }
.site-footer a { color: var(--sand); }

/* Responsive */
@media (max-width: 960px) {
  .hero, .overview, .location, .enquire { grid-template-columns: 1fr; }
  .facts dl { grid-template-columns: repeat(3, 1fr); row-gap: 1.2rem; }
  .facts dl > div { border-left: 0; padding-left: 0; }
  .spaces { grid-template-columns: repeat(2, 1fr); }
  .practical, .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
}
@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
}
@media (max-width: 560px) {
  .facts dl, .grid2, .spaces, .practical, .steps, .rates { grid-template-columns: 1fr 1fr; }
  .grid2, .spaces, .practical, .steps, .rates { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .gallery figure.wide { grid-column: span 2; }
  #map { height: 320px; }
}

/* Text selection: inverted, aubergine background with linen text */
::selection { background: var(--aubergine); color: var(--linen); }
