/* ==========================================================================
   andrews.eu.com — stylesheet
   Coastal Cornwall palette: harbour blue, sand, slate.
   Everything the site looks like is controlled from this one file.
   The colours and sizes below (the "--name: value" lines) are the easiest
   things to change if you fancy a different look.
   ========================================================================== */

:root {
  /* --- Colours ----------------------------------------------------------- */
  --harbour:       #1e4d5c;   /* deep sea blue — headings, header bar */
  --harbour-dark:  #143741;   /* darker blue — hero background, hover states */
  --sea:           #3d7d91;   /* mid blue — links, accents */
  --sand:          #f4efe6;   /* warm off-white page background */
  --sand-deep:     #e8dfd1;   /* slightly darker sand — borders, panels */
  --slate:         #3a4750;   /* body text */
  --slate-soft:    #6b7780;   /* captions, muted text */
  --white:         #ffffff;
  --gorse:         #d99b3f;   /* warm gold accent — small highlights */

  /* --- Type -------------------------------------------------------------- */
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
               "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
               Arial, sans-serif;

  /* --- Layout ------------------------------------------------------------ */
  --measure: 68rem;           /* maximum page width */
  --measure-text: 40rem;      /* maximum width of a paragraph column */
  --gap: 1.75rem;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(20, 55, 65, .08), 0 8px 24px rgba(20, 55, 65, .07);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--harbour);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-top: 2.4em; }
h3 { font-size: 1.25rem; margin-top: 2em; }

/* first heading in a section shouldn't push a big gap */
section > h2:first-child,
.panel > h2:first-child { margin-top: 0; }

p { margin: 0 0 1.2em; }

a {
  color: var(--sea);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--harbour); }

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

hr {
  border: 0;
  border-top: 1px solid var(--sand-deep);
  margin: 3rem 0;
}

::selection { background: var(--gorse); color: var(--white); }

/* Keyboard focus outline — important for accessibility, please keep */
:focus-visible {
  outline: 3px solid var(--gorse);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.prose { max-width: var(--measure-text); }

.prose > p:first-of-type {
  font-size: 1.15rem;
  color: var(--slate);
}

main { padding-bottom: 4rem; }

section { margin-block: 3.5rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--harbour);
  color: var(--white);
  padding: .75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Site header + navigation
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--harbour);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--white);
  text-decoration: none;
  line-height: 1.15;
  padding-block: .5rem;
}
.brand span {
  display: block;
  font-family: var(--font-body);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .65);
  margin-top: .15rem;
}
.brand:hover { color: var(--white); }

.nav-toggle {
  display: none;              /* shown on small screens only */
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  color: var(--white);
  border-radius: var(--radius);
  font: inherit;
  font-size: .9rem;
  padding: .45rem .8rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: .35rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  padding: .5rem .85rem;
  border-radius: var(--radius);
  font-size: .95rem;
}
.site-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, .12);
}

/* the page you are currently on */
.site-nav a[aria-current="page"] {
  color: var(--white);
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 -2px 0 var(--gorse);
}

/* --------------------------------------------------------------------------
   Hero banner
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--harbour-dark);
  color: var(--white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* dark wash so the words stay readable over any photograph */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 55, 65, .55) 0%,
    rgba(20, 55, 65, .35) 45%,
    rgba(20, 55, 65, .78) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(4rem, 14vw, 8.5rem);
  max-width: 44rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: .35em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.hero p {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: rgba(255, 255, 255, .93);
  margin: 0;
  max-width: 34rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
}

.hero .eyebrow {
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gorse);
  margin-bottom: 1rem;
  text-shadow: none;
}

/* smaller hero for the interior pages */
.hero--page .hero-inner { padding-block: clamp(3rem, 9vw, 5.5rem); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--gorse);
  color: #2c1e07;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  padding: .7rem 1.4rem;
  border-radius: var(--radius);
  margin-top: 1.75rem;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover {
  background: #e8ac4d;
  color: #2c1e07;
  transform: translateY(-1px);
}

.btn--quiet {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .5);
  margin-left: .5rem;
}
.btn--quiet:hover { background: rgba(255, 255, 255, .12); color: var(--white); }

/* --------------------------------------------------------------------------
   Card grid — used on the home page
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 6px rgba(20, 55, 65, .1), 0 14px 34px rgba(20, 55, 65, .12);
}

/* The picture area is always 4:3 whatever shape the photograph is, so the
   cards stay level with one another. Positioning the image absolutely is
   what pins it to that box — with a plain "height: 100%" a square photo
   stretches the box taller than the ratio asks for. */
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sand-deep);
}
.card-media img,
.card-media .is-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
}

.card-body { padding: 1.4rem 1.5rem 1.6rem; flex: 1; }
.card-body h3 { margin: 0 0 .4em; }
.card-body p { margin: 0 0 1em; font-size: .97rem; color: var(--slate-soft); }
.card-body p:last-child { margin-bottom: 0; }

.card a.more {
  font-weight: 600;
  font-size: .93rem;
  text-decoration: none;
}
.card a.more::after { content: " \2192"; }
.card a.more:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Figures and photo strips
   -------------------------------------------------------------------------- */

figure {
  margin: 2.25rem 0;
}
figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
figcaption {
  font-size: .88rem;
  color: var(--slate-soft);
  margin-top: .7rem;
  font-style: italic;
}

/* An upright photograph on its own. Left full width it would tower over
   everything, so it is held to a sensible column and centred. */
.figure--upright {
  max-width: min(22rem, 100%);
  margin-inline: auto;
}
.figure--upright figcaption { text-align: center; }

/* A landscape photograph that does not need the full column width. */
.figure--narrow {
  max-width: min(36rem, 100%);
  margin-inline: auto;
}
.figure--narrow figcaption { text-align: center; }

/* --------------------------------------------------------------------------
   Recipe
   Ingredients beside the method on a wide screen, stacked on a phone.
   -------------------------------------------------------------------------- */

.recipe-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 20rem) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-top: 1.5rem;
}

.recipe-grid h4 {
  font-size: 1.05rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-family: var(--font-body);
  color: var(--sea);
  margin: 0 0 .8em;
}

.recipe-ingredients {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .97rem;
}
.recipe-ingredients li {
  padding: .45rem 0;
  border-bottom: 1px solid var(--sand-deep);
}
.recipe-ingredients li:last-child { border-bottom: 0; }
.recipe-ingredients b {
  color: var(--harbour);
  font-weight: 600;
}
.recipe-ingredients .note {
  display: block;
  font-size: .87rem;
  color: var(--slate-soft);
  font-style: italic;
  margin-top: .15rem;
}

.recipe-method {
  margin: 0;
  padding-left: 1.3rem;
  font-size: .99rem;
}
.recipe-method li {
  margin-bottom: .85rem;
  padding-left: .3rem;
}
.recipe-method li::marker {
  color: var(--gorse);
  font-weight: 700;
}

@media (max-width: 46rem) {
  .recipe-grid { grid-template-columns: 1fr; }
}


/* two or three photos side by side */
.photo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: 2.25rem 0;
}
.photo-row figure { margin: 0; }
.photo-row img { aspect-ratio: 3 / 2; object-fit: cover; }

/* For a row of upright photographs — a mast, a dish looked down on — where
   a landscape crop would throw away most of the picture. */
.photo-row--upright img { aspect-ratio: 3 / 4; }
.photo-row--upright .is-placeholder { aspect-ratio: 3 / 4; min-height: 0; }

/* --------------------------------------------------------------------------
   Alternating text + image blocks
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-block: 3.5rem;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split h2 { margin-top: 0; }
.split .split-text > *:last-child { margin-bottom: 0; }

/* put the picture on the right instead */
.split--reverse .split-media { order: 2; }

/* For an upright (portrait) photograph, so it does not tower over the text.
   min() keeps the 24rem cap on a wide screen while still never growing wider
   than the space available — a plain "max-width: 24rem" would override the
   global "max-width: 100%" and push the page sideways on a narrow phone. */
.split-media--portrait img,
.split-media--portrait .is-placeholder {
  max-width: min(24rem, 100%);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Panels, quotes and lists
   -------------------------------------------------------------------------- */

.panel {
  background: var(--white);
  border-left: 4px solid var(--gorse);
  border-radius: var(--radius);
  padding: 1.75rem 1.9rem;
  box-shadow: var(--shadow);
  margin-block: 2.5rem;
}
.panel > *:last-child { margin-bottom: 0; }

blockquote {
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--sand-deep);
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--harbour);
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: .85rem;
  color: var(--slate-soft);
  margin-top: .6rem;
}

.tick-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  max-width: var(--measure-text);
}
.tick-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: .7rem;
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--gorse);
}

/* simple key/value table, e.g. the radio station details */
.spec {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: .97rem;
  max-width: var(--measure-text);
}
.spec th, .spec td {
  text-align: left;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--sand-deep);
  vertical-align: top;
}
.spec th {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--harbour);
  white-space: nowrap;
  width: 12rem;
}

/* wide content must be able to scroll on a phone rather than break the page */
.scroller { overflow-x: auto; }

/* --------------------------------------------------------------------------
   Seasons strip (garden page section)
   -------------------------------------------------------------------------- */

.seasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}
.seasons li {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.seasons h3 {
  margin: 0 0 .4em;
  font-size: 1.05rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-family: var(--font-body);
  color: var(--sea);
}
.seasons p { margin: 0; font-size: .94rem; color: var(--slate-soft); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--harbour);
  color: rgba(255, 255, 255, .8);
  padding-block: 2.5rem;
  font-size: .92rem;
  margin-top: 4rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer a { color: var(--white); }
.site-footer p { margin: 0; }
.site-footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   The village welcome sign
   Drawn entirely in CSS, so it stays sharp at any size and loads instantly.
   To change the wording, edit the text in index.html — not here.
   -------------------------------------------------------------------------- */

.signpost {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 3.5rem auto 1rem;
  max-width: 34rem;
  transform: rotate(-1.1deg);   /* a very slight lean, as they always have */
  filter: drop-shadow(0 10px 18px rgba(20, 55, 65, .18));
}

/* --- the 30 roundel on its yellow backing board --- */
.sign-roundel {
  position: relative;
  width: clamp(4.2rem, 13vw, 5.6rem);
  aspect-ratio: 1;
  background: #f6c026;
  border-radius: 46% 46% 30% 30% / 52% 52% 24% 24%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -.55rem;
  z-index: 1;
  padding: .34rem;
}
.sign-roundel::before {          /* the red ring */
  content: "";
  position: absolute;
  inset: .34rem;
  border-radius: 50%;
  background: #c8102e;
}
.sign-roundel span {             /* the white centre and the number */
  position: relative;
  z-index: 1;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background: #f2f2f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.4rem, 4.4vw, 1.95rem);
  letter-spacing: -.04em;
  color: #17181a;
}

/* --- the main grey plate --- */
.sign-plate {
  width: 100%;
  background: #d6d7d2;
  color: #17181a;
  border: 3px solid #17181a;
  border-radius: 10px;
  padding: clamp(1.1rem, 4vw, 1.7rem) clamp(1rem, 4vw, 2rem)
           clamp(1.2rem, 4vw, 1.8rem);
  text-align: center;
  box-shadow: inset 0 0 0 3px #d6d7d2, inset 0 0 0 4px rgba(0, 0, 0, .18);
}

.sign-plate .sign-welcome {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(.95rem, 3.2vw, 1.35rem);
  letter-spacing: .02em;
  margin: 0 0 .1em;
  text-transform: uppercase;
}

.sign-plate .sign-place {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(1.85rem, 8vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  margin: 0 0 .28em;
  text-transform: uppercase;
  color: #17181a;
}

.sign-plate .sign-joke {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(.82rem, 2.9vw, 1.12rem);
  line-height: 1.28;
  letter-spacing: .01em;
  margin: 0;
  text-transform: uppercase;
}

/* --- the two posts --- */
.sign-posts {
  display: flex;
  gap: clamp(4rem, 22vw, 8rem);
  margin-top: -2px;
}
.sign-posts span {
  display: block;
  width: .72rem;
  height: clamp(2.5rem, 7vw, 3.6rem);
  background: linear-gradient(to right, #9aa0a2, #c3c8c9 45%, #8d9395);
  border-radius: 0 0 2px 2px;
}

.signpost-caption {
  text-align: center;
  font-size: .88rem;
  color: var(--slate-soft);
  font-style: italic;
  margin: .4rem auto 0;
  max-width: 34rem;
}

/* --------------------------------------------------------------------------
   Placeholder pictures
   Shown automatically while a photograph is still missing, so the page
   never looks broken. They disappear the moment you add the real file.
   -------------------------------------------------------------------------- */

.is-placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      var(--sand-deep) 0 12px,
      #ddd2c0 12px 24px
    );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--harbour);
  font-family: var(--font-body);
  font-size: .82rem;
  line-height: 1.45;
  padding: 1.25rem;
  min-height: 11rem;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* the <br> between the description and the filename is not needed
   once the box is stacking its contents vertically */
.is-placeholder br { display: none; }
.is-placeholder b {
  font-size: .95rem;
  margin-bottom: .35rem;
  max-width: min(22rem, 100%);
}
.is-placeholder > span { max-width: min(22rem, 100%); }
.is-placeholder code { max-width: 100%; }
.is-placeholder code {
  display: inline-block;
  margin-top: .5rem;
  background: rgba(255, 255, 255, .7);
  padding: .15rem .45rem;
  border-radius: 3px;
  font-size: .78rem;
  color: var(--slate);
  word-break: break-all;
}
/* Placeholders sitting inside a dark hero: the banner already carries the
   heading, so tuck the "photograph to come" note into the bottom corner
   instead of centring it underneath the words. */
.hero .is-placeholder {
  position: absolute;
  inset: 0;
  border-radius: 0;
  box-shadow: none;
  align-items: flex-end;
  justify-content: flex-end;
  text-align: right;
  padding: 1.15rem 1.35rem;
  min-height: 0;
}
.hero .is-placeholder b,
.hero .is-placeholder > span {
  max-width: none;
  font-size: .78rem;
  font-weight: 600;
  margin: 0;
  color: rgba(255, 255, 255, .82);
}
.hero .is-placeholder code {
  margin-top: .25rem;
  background: rgba(0, 0, 0, .35);
  color: rgba(255, 255, 255, .9);
  font-size: .72rem;
}
/* On a phone there is no room for the note beside the heading, so show the
   texture alone. The reminder is still visible on a larger screen. */
@media (max-width: 40rem) {
  .hero .is-placeholder b,
  .hero .is-placeholder > span,
  .hero .is-placeholder code { display: none; }
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 46rem) {
  .nav-toggle { display: block; }

  .site-header .wrap { flex-wrap: wrap; }

  .site-nav {
    display: none;
    width: 100%;
    padding-bottom: .9rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: .15rem; }
  .site-nav a { padding: .7rem .85rem; }

  .split { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }

  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   Printing and reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .site-footer, .btn { display: none; }
  body { background: #fff; }
  .hero { color: #000; }
  .hero-media { display: none; }
  .hero h1, .hero p { color: #000; text-shadow: none; }
}
