/* =================================================================
   Adare Country House — Design System
   Heritage countryside-luxury: deep green, warm ivory, brass accent
   ================================================================= */

:root {
  /* Palette */
  --green-900: #15301f;
  --green-800: #1f3d2b;
  --green-700: #2c5139;
  --green-100: #e7efe7;
  --ivory:     #f7f3ea;
  --cream:     #efe8d8;
  --brass:     #b08d4f;
  --brass-dark:#8c6d39;
  --charcoal:  #2a2724;
  --muted:     #6b6256;
  --white:     #ffffff;

  /* Type */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gap: clamp(1rem, 3vw, 2.5rem);
  --radius: 4px;
  --shadow: 0 18px 40px -22px rgba(21, 48, 31, 0.45);
  --header-h: 78px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--ivory);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0 0 .4em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.7rem); }
p  { margin: 0 0 1.1em; }

/* ---------- Helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gap); }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tint { background: var(--cream); }
.section--green { background: var(--green-800); color: var(--green-100); }
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--brass-dark);
  margin-bottom: 1rem;
  display: inline-block;
}
.section--green .eyebrow { color: var(--brass); }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.divider { width: 56px; height: 2px; background: var(--brass); border: 0; margin: 1.4rem 0; }
.center .divider { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .78rem;
  padding: .95rem 2rem;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .25s ease;
}
.btn--primary { background: var(--brass); color: var(--white); }
.btn--primary:hover { background: var(--brass-dark); transform: translateY(-2px); }
.btn--ghost { border-color: currentColor; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--green-900); }
.btn--dark { background: var(--green-800); color: var(--white); }
.btn--dark:hover { background: var(--green-900); transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.scrolled,
.site-header.solid {
  background: var(--ivory);
  box-shadow: 0 2px 18px -8px rgba(0,0,0,.3);
}
.nav { width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gap); display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--white); line-height: 1.05; }
.brand small { display: block; font-family: var(--font-body); font-size: .58rem; letter-spacing: .25em;
  text-transform: uppercase; font-weight: 700; opacity: .85; }
.scrolled .brand, .solid .brand { color: var(--green-900); }

.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--white); font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; position: relative; padding-block: .3rem;
}
.scrolled .nav-links a, .solid .nav-links a { color: var(--green-900); }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--brass); transition: width .25s ease;
}
.nav-links a:not(.btn):hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links .btn { color: var(--white); }
.nav-links .btn:hover { color: var(--white); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--white); margin: 5px 0; transition: .3s; }
.scrolled .nav-toggle span, .solid .nav-toggle span { background: var(--green-900); }

/* ---------- Hero ---------- */
.hero {
  min-height: 92vh; display: flex; align-items: center; position: relative;
  color: var(--white); text-align: center; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,48,31,.55) 0%, rgba(21,48,31,.35) 40%, rgba(21,48,31,.7) 100%);
  z-index: 1;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .container { position: relative; z-index: 2; }
.hero h1 { color: var(--white); text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero .lead { color: rgba(255,255,255,.92); font-size: 1.25rem; max-width: 52ch; margin: 0 auto 2rem; }
.hero .eyebrow { color: #e9d3a6; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.page-hero {
  min-height: 56vh; display: flex; align-items: center; position: relative;
  color: var(--white); text-align: center; overflow: hidden;
}
.page-hero::before { content:""; position:absolute; inset:0; background: rgba(21,48,31,.55); z-index:1; }
.page-hero .hero-bg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); }
.page-hero .eyebrow { color: #e9d3a6; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature {
  background: var(--white); padding: 2.2rem 1.8rem; border-radius: var(--radius);
  border: 1px solid rgba(176,141,79,.18); text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .icon { font-size: 1.9rem; color: var(--brass); margin-bottom: .8rem; }
.feature h3 { margin-bottom: .3rem; }
.feature p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- Split (image + text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.split-body h2 { margin-bottom: .5rem; }

/* ---------- Room cards ---------- */
.room-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 10px 30px -20px rgba(21,48,31,.4); display: flex; flex-direction: column;
}
.room-card img { width: 100%; height: 250px; object-fit: cover; }
.room-card .room-body { padding: 1.8rem; flex: 1; display: flex; flex-direction: column; }
.room-card h3 { margin-bottom: .2rem; }
.room-tags { list-style: none; margin: .8rem 0 1.4rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.room-tags li { font-size: .76rem; background: var(--green-100); color: var(--green-800);
  padding: .3rem .7rem; border-radius: 100px; font-weight: 600; }
.room-card .btn { margin-top: auto; align-self: flex-start; }

/* Price block sits above the description, so the rate is the first thing read. */
.room-rate { display: flex; align-items: baseline; gap: .5rem; margin: .6rem 0 .2rem; }
.room-rate .from { font-family: var(--font-body); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.room-rate .amount { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--green-800); line-height: 1; }
.room-rate .per { font-size: .82rem; color: var(--muted); }
.room-occupancy { font-size: .92rem; color: var(--muted); margin: 0 0 .4rem; }
.room-limited { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--brass-dark); background: rgba(176,141,79,.14);
  padding: .25rem .6rem; border-radius: 100px; margin-bottom: .6rem; }

/* ---------- Room slide deck ---------- */
.room-gallery { position: relative; background: var(--green-900); overflow: hidden; }
.room-gallery .slides { display: flex; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
.room-slide { min-width: 100%; aspect-ratio: 16 / 10; }
.room-slide img { width: 100%; height: 100%; object-fit: cover; }

.gal-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.86); color: var(--green-900);
  font-size: 1.1rem; line-height: 1; display: grid; place-items: center;
  opacity: 0; transition: opacity .25s ease, background .2s ease;
}
.gal-btn:hover { background: var(--white); }
.gal-prev { left: .7rem; }
.gal-next { right: .7rem; }
.room-gallery:hover .gal-btn,
.gal-btn:focus-visible { opacity: 1; }

.gal-dots { position: absolute; bottom: .75rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: .35rem; }
.gal-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 100px; cursor: pointer;
  background: rgba(255,255,255,.55); transition: width .25s ease, background .25s ease; }
.gal-dot.active { width: 22px; background: var(--brass); }

.gal-count { position: absolute; top: .7rem; right: .7rem; font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; color: var(--white); background: rgba(21,48,31,.6);
  padding: .25rem .6rem; border-radius: 100px; backdrop-filter: blur(2px); }

/* Touch devices have no hover, so the arrows stay visible. */
@media (hover: none) {
  .gal-btn { opacity: 1; }
}

/* ---------- Info / details ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid rgba(176,141,79,.2); }
.info-list li:last-child { border-bottom: 0; }
.info-list .label { font-weight: 700; min-width: 130px; color: var(--green-800); }
.section--green .info-list li { border-color: rgba(255,255,255,.15); }
.section--green .info-list .label { color: #e9d3a6; }

/* ---------- Form ---------- */
/* position:relative keeps the hidden fields contained once the success
   panel takes over — see .form-fields.is-hidden below. */
.form-card { position: relative; background: var(--white); padding: clamp(1.6rem, 4vw, 2.8rem); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 700; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: .45rem; color: var(--green-800); }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; font-family: var(--font-body); font-size: 1rem;
  border: 1.5px solid #d8cdb8; border-radius: var(--radius); background: var(--ivory); color: var(--charcoal);
  transition: border-color .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brass); background: var(--white);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: .6rem; }
.form-status { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: var(--radius); display: none; font-weight: 600; }
.form-status.show { display: block; }
.form-status.ok { background: var(--green-100); color: var(--green-800); }
.form-status.err { background: #f7e0dc; color: #9a3b2c; }
.form-status.err { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Sending: the label is swapped for a spinner so the button keeps its size. */
.btn.is-sending { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-sending::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: var(--white);
  animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success: the whole form is replaced by a confirmation panel. */
.form-fields { transition: opacity .3s ease, transform .3s ease; }
.form-fields.is-hidden { opacity: 0; transform: translateY(-8px); position: absolute; pointer-events: none; visibility: hidden; }

.form-success { display: none; text-align: center; padding: 1.4rem .5rem .6rem; }
.form-success.show { display: block; animation: successIn .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes successIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.success-mark { width: 78px; height: 78px; margin: 0 auto 1.3rem; display: block; }
.success-mark .ring {
  fill: none; stroke: var(--brass); stroke-width: 3;
  stroke-dasharray: 176; stroke-dashoffset: 176;
  animation: draw .75s .05s cubic-bezier(.65, 0, .35, 1) forwards;
}
.success-mark .tick {
  fill: none; stroke: var(--green-800); stroke-width: 4.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 44; stroke-dashoffset: 44;
  animation: draw .35s .55s ease-out forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.form-success h3 { color: var(--green-800); margin-bottom: .4rem; }
.form-success p { color: var(--muted); max-width: 42ch; margin-inline: auto; }
.form-success .btn { margin-top: .6rem; }

/* ---------- Testimonial ---------- */
.quote { max-width: 760px; margin-inline: auto; text-align: center; }
.quote blockquote { font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.35; margin: 0 0 1rem; font-style: italic; }
.quote cite { font-family: var(--font-body); font-style: normal; letter-spacing: .1em;
  text-transform: uppercase; font-size: .78rem; font-weight: 700; color: var(--brass); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.8); padding-block: 3.5rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--gap); margin-bottom: 2.5rem; }
.site-footer h4 { font-family: var(--font-display); color: var(--white); font-size: 1.3rem; margin: 0 0 .8rem; }
.site-footer a:hover { color: var(--brass); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; font-size: .95rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .82rem; opacity: .75; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,.85); max-width: 50ch; margin-inline: auto; }

/* ---------- Gallery ---------- */
.filter-bar { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.8rem; }
.filter-btn {
  border: 1.5px solid #d8cdb8; background: var(--white); color: var(--green-800);
  padding: .55rem 1.4rem; border-radius: 100px; font-family: var(--font-body);
  font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  cursor: pointer; transition: all .2s ease;
}
.filter-btn:hover { border-color: var(--brass); }
.filter-btn.active { background: var(--green-800); color: var(--white); border-color: var(--green-800); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--gap); }

.art-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 10px 30px -20px rgba(21,48,31,.4); display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.art-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.art-media { position: relative; aspect-ratio: 4 / 5; background: var(--cream); overflow: hidden; }
.art-media img { width: 100%; height: 100%; object-fit: cover; }
.art-card.is-sold .art-media img { filter: grayscale(.35) brightness(.95); }
.art-badges { position: absolute; top: .8rem; left: .8rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.art-badge {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  padding: .3rem .65rem; border-radius: 100px; background: rgba(31,61,43,.92); color: var(--white);
  backdrop-filter: blur(2px);
}
.art-badge--sold { background: #9a3b2c; }
.art-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.art-title { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.15; margin: 0 0 .25rem; }
.art-meta { color: var(--muted); font-size: .9rem; margin: 0 0 .2rem; }
.art-desc { color: var(--charcoal); font-size: .92rem; margin: .5rem 0 1rem; }
.art-price { font-family: var(--font-display); font-size: 1.5rem; color: var(--green-800); font-weight: 600; margin: .2rem 0 1.1rem; }
.art-price.on-enquiry { font-size: 1.05rem; font-style: italic; color: var(--brass-dark); font-family: var(--font-body); }
.art-card .btn { margin-top: auto; align-self: flex-start; }
.gallery-status { text-align: center; color: var(--muted); padding: 3rem 0; grid-column: 1 / -1; }

.enquiry-context {
  background: var(--green-100); border: 1px solid rgba(176,141,79,.25); border-radius: var(--radius);
  padding: .9rem 1.1rem; margin-bottom: 1.4rem; font-size: .95rem; color: var(--green-800); display: none;
}
.enquiry-context.show { display: block; }
.enquiry-context strong { font-weight: 700; }
input[readonly] { background: var(--green-100) !important; cursor: default; }

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

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .split, .split--reverse { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .field-row { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ivory); padding: 1rem var(--gap) 2rem;
    box-shadow: 0 12px 24px -10px rgba(0,0,0,.25);
    transform: translateY(-120%); transition: transform .35s ease; visibility: hidden;
  }
  .nav-links.open { transform: none; visibility: visible; }
  .nav-links a { color: var(--green-900) !important; padding: .9rem 0; border-bottom: 1px solid rgba(176,141,79,.18); }
  .nav-links a::after { display: none; }
  .nav-links .btn { text-align: center; margin-top: 1rem; color: var(--white) !important; border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .room-gallery .slides { transition: none; }
  .form-status.err,
  .form-success.show { animation: none; }
  /* Draw the tick instantly rather than animating the strokes. */
  .success-mark .ring, .success-mark .tick { animation: none; stroke-dashoffset: 0; }
}
