/* =========================================================
   Glyn Cynwal Isaf Cottage — stylesheet
   Palette drawn from the place itself: stone, slate, moss,
   and the oxide-red of old barn timber.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
    --stone:      #f1ede3;   /* page background */
    --stone-dark: #e4ddcc;   /* card / section background */
    --slate:      #2c3630;   /* near-black green, primary text & header */
    --slate-soft: #55625a;   /* secondary text */
    --moss:       #5c7a5a;   /* links, accents */
    --moss-dark:  #3f5940;
    --oxide:      #a3552f;   /* CTA / highlight, like old barn timber */
    --oxide-dark: #82401f;
    --line:       #cfc6ae;   /* hairline borders */

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--stone);
    color: var(--slate);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--moss-dark); }
a:hover { color: var(--oxide); }

/* ---------- header / nav ---------- */
.site-header {
    background: var(--slate);
    color: var(--stone);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}
.brand { color: var(--stone); text-decoration: none; line-height: 1.2; }
.brand-name { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.brand-sub { display: block; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: #b9c2ba; }

.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a {
    color: #d9ddd6;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a.active { color: #fff; border-bottom-color: var(--oxide); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--stone); margin: 5px 0; }

@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .site-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
        padding-bottom: 14px;
    }
    .site-nav.open { display: flex; }
    .header-inner { flex-wrap: wrap; }
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    color: #fff;
    background-size: cover;
    background-position: center;
    min-height: 62vh;
    display: flex;
    align-items: flex-end;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(20,26,22,0.15) 0%, rgba(20,26,22,0.75) 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 48px 0 56px; }
.hero-eyebrow {
    text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem;
    color: #e8c9ad; margin-bottom: 10px; font-weight: 600;
}
.hero h1 { color: #fff; max-width: 780px; }
.hero-lede { max-width: 600px; font-size: 1.1rem; color: #ecece4; }

/* mountain-skyline divider — the site's signature motif, echoing the
   Brecon Beacons ridgeline the cottage sits beneath */
.skyline {
    display: block;
    width: 100%;
    height: 42px;
    fill: var(--stone);
}

/* ---------- sections / layout ---------- */
section { padding: 56px 0; }
.section-alt { background: var(--stone-dark); }
.lede { font-size: 1.15rem; color: var(--slate-soft); max-width: 640px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
@media (max-width: 760px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 24px;
}

.btn {
    display: inline-block;
    background: var(--oxide);
    color: #fff;
    text-decoration: none;
    padding: 12px 26px;
    border-radius: 3px;
    font-weight: 600;
    border: 0;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font-body);
}
.btn:hover { background: var(--oxide-dark); color: #fff; }
.btn-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.7);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ---------- feature strip (photo badges on homepage) ---------- */
.badge-strip { display: flex; gap: 20px; align-items: center; justify-content: center; flex-wrap: wrap; }
.badge-strip img { max-height: 110px; width: auto; border-radius: 4px; }

/* ---------- quote / guestbook ---------- */
blockquote {
    margin: 0 0 20px;
    padding-left: 18px;
    border-left: 3px solid var(--moss);
    font-style: italic;
    color: var(--slate-soft);
}
blockquote cite { display: block; font-style: normal; font-size: 0.85rem; margin-top: 6px; color: var(--slate-soft); }

/* ---------- gallery ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.gallery-grid a { display: block; line-height: 0; border-radius: 4px; overflow: hidden; }
.gallery-grid img { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform 0.35s ease; }
.gallery-grid a:hover img { transform: scale(1.06); }

/* lightbox */
#lightbox {
    display: none;
    position: fixed; inset: 0; z-index: 200;
    background: rgba(20,20,18,0.92);
    align-items: center; justify-content: center;
    padding: 24px;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 92vw; max-height: 86vh; border: 4px solid #fff; }
#lightbox .lb-close {
    position: absolute; top: 20px; right: 28px;
    color: #fff; font-size: 2rem; background: none; border: 0; cursor: pointer; line-height: 1;
}
#lightbox .lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.15); border: 0; color: #fff;
    font-size: 1.6rem; padding: 10px 16px; cursor: pointer; border-radius: 3px;
}
#lightbox .lb-prev { left: 18px; }
#lightbox .lb-next { right: 18px; }

/* ---------- features / lists ---------- */
ul.feature-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
ul.feature-list li {
    padding: 6px 0 6px 22px;
    position: relative;
    break-inside: avoid;
    border-bottom: 1px solid var(--line);
}
ul.feature-list li::before {
    content: "";
    position: absolute; left: 0; top: 14px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--moss);
}
@media (max-width: 600px) { ul.feature-list { columns: 1; } }

/* ---------- calendar ---------- */
.cal-legend { display: flex; gap: 20px; margin-bottom: 18px; font-size: 0.9rem; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 14px; height: 14px; border-radius: 2px; display: inline-block; }
.cal-legend .avail i { background: #cfe0cd; border: 1px solid var(--moss); }
.cal-legend .unavail i { background: #e6c3b5; border: 1px solid var(--oxide); }

.cal-month { margin-bottom: 40px; }
.cal-month h3 { margin-bottom: 12px; }
table.cal-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.cal-table th {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--slate-soft); padding: 6px 0; font-weight: 600;
}
table.cal-table td {
    text-align: center;
    padding: 10px 4px;
    border: 1px solid var(--line);
    font-size: 0.9rem;
}
table.cal-table td.empty { border: none; background: none; }
table.cal-table td.avail { background: #eaf1e8; }
table.cal-table td.unavail { background: #f2dfd3; color: var(--oxide-dark); }
table.cal-table td.today { outline: 2px solid var(--slate); outline-offset: -2px; font-weight: 700; }

/* ---------- forms ---------- */
form.contact-form { max-width: 560px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.form-row input, .form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: #fff;
}
.form-row textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--slate-soft); }
.alert { padding: 14px 18px; border-radius: 3px; margin-bottom: 20px; }
.alert-success { background: #e3efe0; border: 1px solid var(--moss); color: var(--moss-dark); }
.alert-error { background: #f4e1d8; border: 1px solid var(--oxide); color: var(--oxide-dark); }

/* ---------- footer ---------- */
.site-footer { background: var(--slate); color: #cfd5cf; margin-top: 40px; }
.footer-inner {
    display: flex; flex-wrap: wrap; gap: 24px;
    justify-content: space-between;
    padding: 36px 0 24px;
    font-size: 0.92rem;
}
.footer-inner a { color: #e8c9ad; }
.footer-copy { width: 100%; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.8rem; color: #9aa39b; }
