/* The Douglas Hotel: the one stylesheet for every page.
 *
 *  1. Tokens          fonts, colours, light and dark themes
 *  2. Base            elements, links, focus, headings
 *  3. Header and nav
 *  4. Buttons
 *  5. Page sections   hero, full-bleed photos, facts, bands
 *  6. Layouts         split, mosaic, gallery, columns, archive
 *  7. Text            eyebrow, intro, quote, note, tags, things to do
 *  8. Contact form
 *  9. Footer
 * 10. Tablet          701px to 1024px
 * 11. Mobile          700px and below
 * 12. Reduced motion
 */


/* 1. Tokens ---------------------------------------------------------------- */

/* Served from /fonts (no third-party requests). Both are variable fonts, so one
   file covers every weight in the range. Licences: fonts/OFL-*.txt. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("../fonts/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/outfit.woff2") format("woff2");
}

:root {
  --ink: #1c1814;
  --muted: #5a5248;
  --bg: #faf7f2;
  --surface: #fff;
  --line: rgba(28, 24, 20, .08);
  --green: #1f5a38;
  --link: var(--green);
  --success: var(--green);
  --error: #a3361f;
  --gold: #c4a574;
  --gold-light: #d4b98c;
  --night: #1c1814;              /* header and footer, in both themes */
  --on-night: #e8e0d4;

  --serif: "Fraunces", serif;
  --sans: "Outfit", sans-serif;
  --serif-weight: 500;
  --heading-weight: 560;

  --gutter: 4vw;
  --radius: 4px;
  --pill: 999px;
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #f3eee6;
  --muted: #b5ab9e;
  --bg: #0e0c0a;
  --surface: #1a1714;
  --line: rgba(243, 238, 230, .1);
  --link: #7cc49a;
  --success: #7cc49a;
  --error: #f0957f;
  color-scheme: dark;
}


/* 2. Base ------------------------------------------------------------------ */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  /* Keep colours and photographs when a page is printed or saved as PDF. */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: var(--link); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* A page's h1 looks like a section heading; the home page's hero h1 is larger. */
h1,
h2 {
  margin: 0 0 .8rem;
  font-family: var(--serif);
  font-weight: var(--heading-weight);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 50;
  padding: .6rem 1rem;
  border-radius: var(--pill);
  background: var(--gold);
  color: var(--night);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }


/* 3. Header and nav -------------------------------------------------------- */

/* Sits over the photograph at the top of the page. */
header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 3.5vw;
  color: #fff;
  background: linear-gradient(to bottom, rgba(18, 14, 10, .72), rgba(18, 14, 10, .18));
  border-bottom: 1px solid rgba(196, 165, 116, .35);
}

/* Pages with no photograph at the top (contact, thank you). */
.page-plain header { background: var(--night); }
.page-plain main { padding-top: 5rem; }

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: #fff;
  text-decoration: none;
}
.brand strong {
  display: block;
  font-family: var(--serif);
  font-weight: var(--heading-weight);
  font-size: 1.3rem;
}
.brand em {
  font-style: normal;
  font-size: .58rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--serif);
  font-weight: var(--serif-weight);
}

nav {
  display: flex;
  align-items: center;
  gap: .3rem;
}
nav a {
  padding: .45rem .75rem;
  border-radius: var(--pill);
  color: #fff;
  font-size: .88rem;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
nav a:hover {
  background: rgba(255, 255, 255, .14);
  transform: translateY(-2px);
}
nav a[aria-current="page"]:not(.nav-cta) { box-shadow: inset 0 -1px 0 var(--gold); }
nav .nav-cta {
  background: var(--gold);
  color: var(--night);
}
nav .nav-cta:hover { background: var(--gold-light); }

/* Shown on mobile only (see section 11). */
.menu-btn {
  display: none;
  padding: .4rem .7rem;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 8px;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font: inherit;
}


/* 4. Buttons --------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: .75rem 1.2rem;
  border: 0;
  border-radius: var(--pill);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.btn-green {
  background: var(--green);
  color: #fff;
}

/* Gold call-to-action on photographs (matches the Enquire button). */
.btn-gold {
  background: var(--gold);
  color: var(--night);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: transform .2s, background .2s;
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* Outline on a photograph. */
.btn-line {
  border: 1px solid rgba(255, 255, 255, .6);
  color: #fff;
  transition: background .2s;
}
.btn-line:hover { background: rgba(255, 255, 255, .12); }

/* Outline on the page. */
.btn-outline {
  border: 1.5px solid var(--link);
  color: var(--link);
}
.btn-outline:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}


/* 5. Page sections --------------------------------------------------------- */

section { padding: 4.5rem var(--gutter); }

/* Home page: the photograph of the front, full height. */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 100vh;
  background: url("../images/front.jpg") center 35% / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Dark enough behind the text to read it over the stonework and the sign. */
  background: linear-gradient(to top, rgba(18, 14, 10, .85) 0%, rgba(18, 14, 10, .6) 45%, transparent 80%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  padding: 0 var(--gutter) 8vh;
  color: #fff;
}
.hero-inner h1 {
  margin: 0 0 .6rem;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: .92;
  letter-spacing: -.03em;
}

/* A photograph filling the width, with a caption across the bottom.
   The photograph is set by one of the .bg-* classes. */
.fullbleed {
  display: grid;
  align-items: end;
  height: 70vh;
  margin: 0;
  padding: 0;
  background-position: center;
  background-size: cover;
}
.fullbleed.tall { height: 78vh; }
.fullbleed.taller { height: 85vh; }
.fullbleed .cap {
  padding: 2rem var(--gutter);
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .45));
}
.fullbleed h1,
.fullbleed h2 { color: #fff; }

.bg-warbla { background-image: url("../images/warbla.jpg"); }
.bg-room { background-image: url("../images/room.jpg"); }
.bg-dining { background-image: url("../images/dining.jpg"); }

/* Row of key facts under a photograph. */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
}
.facts div {
  padding: 1.3rem 1.1rem;
  border-right: 1px solid var(--line);
}
.facts small {
  display: block;
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts strong {
  font-family: var(--serif);
  font-weight: var(--heading-weight);
  font-size: 1.1rem;
}

/* A text panel set apart from the page background. */
.band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}


/* 6. Layouts --------------------------------------------------------------- */

/* Text beside a photograph. */
.split {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2.5rem;
  align-items: center;
}
.split img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Home page: one large photograph beside two smaller ones. */
.mosaic {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 280px 280px;
  gap: .5rem;
  margin-top: 2rem;
}
.mosaic .big { grid-row: span 2; }

/* Captioned photographs: shared by the mosaic and galleries. */
.mosaic figure,
.gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
}
.mosaic figure { height: 100%; }
.mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mosaic figcaption {
  position: absolute;
  bottom: .7rem;
  left: .8rem;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

/* Three across; a .wide photograph takes two places.
   .trio keeps three photographs to a single row. */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-top: 1.5rem;
}
.gallery figure { background: var(--line); }
.gallery .wide { grid-column: span 2; }
.gallery.trio .wide { grid-column: auto; }
.gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}
.gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem .8rem .6rem;
  color: #fff;
  font-size: .88rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}

/* Three columns of text. */
.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}
.cols h3 {
  margin: 0 0 .5rem;
  font-family: var(--serif);
  font-weight: var(--heading-weight);
  font-size: 1.35rem;
  line-height: 1.15;
}
.cols p { margin: 0 0 .7rem; }

/* Home page: the old photograph beside its text. */
.archive {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2rem;
  align-items: center;
}
.archive img {
  width: 100%;
  border-radius: var(--radius);
  filter: sepia(.15);
}


/* 7. Text ------------------------------------------------------------------ */

.eyebrow {
  margin: 0 0 .5rem;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

.intro { max-width: 46rem; }
.intro p:not(.eyebrow):not(.note) { font-size: 1.12rem; }

.quote {
  font-family: var(--serif);
  font-weight: var(--serif-weight);
  font-size: 1.6rem;
  line-height: 1.25;
}

.note {
  font-size: .9rem;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: .3rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--bg);
  font-size: .88rem;
}

/* Running text with headings and lists (the privacy notice). */
.prose h2 {
  margin: 2.2rem 0 .6rem;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  line-height: 1.15;
}
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }

/* Location page: lists of walks and places. */
.todo ul {
  margin: 0;
  padding-left: 1.1rem;
}
.todo li { margin-bottom: .55rem; }
.todo li strong { font-weight: 500; }


/* 8. Contact form ---------------------------------------------------------- */

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}

label {
  display: grid;
  gap: .25rem;
  font-size: .84rem;
}
label.full { grid-column: 1 / -1; }

input,
textarea,
select {
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
textarea { min-height: 100px; }

input[type="date"] {
  width: 100%;
  min-height: 2.9rem;
  -webkit-appearance: none;
  appearance: none;
}
input[type="date"]::-webkit-date-and-time-value { text-align: left; }

/* "2 nights" under the date pickers. */
.field-hint {
  grid-column: 1 / -1;
  margin: -.3rem 0 0;
  font-size: .8rem;
  color: var(--muted);
}

form .btn { justify-self: start; }
form .btn[disabled] {
  opacity: .6;
  cursor: wait;
}

.form-status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: .95rem;
}
.form-status:empty { display: none; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--error); }

/* Spam trap: hidden from people, filled in by bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* 9. Footer ---------------------------------------------------------------- */

footer {
  padding: 2.5rem 5vw 1rem;
  border-top: 1px solid rgba(196, 165, 116, .5);
  background: var(--night);
  color: var(--on-night);
}

.foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr 1fr;
  gap: 2rem;
}
.foot h2 {
  margin: 0 0 .5rem;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  line-height: 1.55;
  text-transform: uppercase;
  color: var(--gold);
}
.foot a {
  display: block;
  padding: .15rem 0;
  color: var(--on-night);
  text-decoration: none;
}
.foot a:hover { color: var(--gold); }
.foot .foot-phone {
  font-family: var(--serif);
  font-weight: var(--serif-weight);
  font-size: 1.3rem;
  color: var(--gold);
}
.foot-brand { margin-bottom: .5rem; }

.foot-bar {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-top: 1.4rem;
  padding-top: .8rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .75rem;
  opacity: .65;
}
.foot-bar span:first-child { margin-right: auto; }
.foot-bar a {
  color: inherit;
  text-underline-offset: 2px;
}
.foot-bar a:hover { color: var(--gold); }

/* Light / dark switch: a quiet text link at the end of the footer. */
.theme-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.theme-btn:hover { color: var(--gold); }


/* 10. Tablet: 701px to 1024px ---------------------------------------------- */

@media (min-width: 701px) and (max-width: 1024px) {
  section { padding: 3rem 3vw; }

  nav { gap: .15rem; }
  nav a {
    padding: .4rem .55rem;
    font-size: .82rem;
  }

  .hero-inner h1 { font-size: 3.4rem; }

  .facts div { padding: 1rem .7rem; }
  .facts strong { font-size: .95rem; }

  .split {
    grid-template-columns: 1fr 1fr;
    gap: 1.6rem;
  }
  .split img { height: 320px; }

  .mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 320px 240px;
  }
  .mosaic .big {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .cols { grid-template-columns: 1fr 1fr; }

  .foot {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}


/* 11. Mobile: 700px and below ---------------------------------------------- */

@media (max-width: 700px) {
  section { padding: 2.2rem 5vw; }

  /* The header stays at the top, and the nav opens beneath it. */
  header {
    position: sticky;
    background: var(--night);
  }
  .page-plain main { padding-top: 0; }

  .menu-btn {
    display: block;
    min-width: 44px;
    min-height: 44px;
  }
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 5vw;
    background: var(--night);
  }
  nav.open { display: flex; }
  nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .hero { min-height: 85vh; }
  .hero-inner h1 { font-size: 2.4rem; }

  .facts { grid-template-columns: 1fr 1fr; }
  .facts div { border-bottom: 1px solid var(--line); }

  .split,
  .archive,
  .cols,
  .foot,
  form { grid-template-columns: 1fr; }

  .split img { height: 220px; }
  .archive { gap: 1rem; }
  .cols { gap: 1.2rem; }

  .mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: 220px;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: .35rem;
  }
  .gallery .wide,
  .gallery.trio .wide { grid-column: 1 / -1; }
  .gallery img { height: 150px; }
  .gallery figcaption {
    padding: 1.2rem .5rem .4rem;
    font-size: .78rem;
  }

  .foot { gap: 1.2rem; }
  .foot-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
  }
}


/* 12. Reduced motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
  nav a:hover,
  .btn-gold:hover { transform: none; }
}
