/* =========================================================
   Dabouq Cottage - all styles for the site
   ========================================================= */

/* ---- Fonts (local files in the font/ folder) ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 900;          /* one variable file covers every weight */
  font-display: fallback;
  src: url("../font/inter-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Cardo";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("../font/cardo-400.woff2") format("woff2");
}

@font-face {
  font-family: "Cardo";
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: url("../font/cardo-700.woff2") format("woff2");
}

/* ---- Colors and fonts (same palette as dabouqcottage.com) ---- */
:root {
  --base:      #f9f9f9;   /* page background */
  --base-2:    #ffffff;   /* cards, header */
  --contrast:  #111111;   /* main text */
  --contrast-2:#636363;   /* muted text */
  --accent:    #c2a990;   /* warm beige */
  --body-font:    "Inter", sans-serif;
  --heading-font: "Cardo", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--base);
  color: var(--contrast);
  font-family: var(--body-font);
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;   /* stop iPhone from enlarging text in landscape */
  overflow-wrap: break-word;        /* long words (e-mail, links) never overflow */
}

/* No image is ever wider than the screen */
img { max-width: 100%; height: auto; }

/* Content is centered in a narrow column; images use the wide column. */
.content { max-width: 620px;  margin: 0 auto; }
.wide    { max-width: 1280px; margin: 0 auto; }

h1, h2 { font-family: var(--heading-font); font-weight: 400; }

a { color: inherit; }

/* ---- Header (both pages) ---- */
header {
  background: var(--base-2);
  padding: 16px;
  text-align: center;
}
header img { width: 150px; height: auto; }

/* ---- Buttons ---- */
.button {
  display: inline-block;
  background: var(--contrast);
  color: var(--base);
  padding: 0.7rem 1.6rem;
  border: none;
  border-radius: 0.33rem;
  font-family: var(--body-font);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--accent); color: var(--contrast); }

/* =========================================================
   Home page
   ========================================================= */

.hero { padding: 2rem 1.5rem 3rem; text-align: center; }

/* Font size grows with the screen: small on phones, large on desktop */
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.27rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.hero p { margin: 0 auto 2rem; }

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  display: block;
}

/* ---- Newsletter card ---- */
.newsletter {
  background: var(--base-2);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  margin: 0 1.5rem 3rem;
  text-align: center;
}
.newsletter h2 { font-size: clamp(1.85rem, 4vw, 2.5rem); margin: 0 0 0.5rem; }
.newsletter p  { margin: 0 0 1.5rem; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid #e5e5e5;
  padding: 2rem 1.5rem;
  font-size: 0.95rem;
}
.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-columns > div:first-child { flex: 2 1 260px; }
.footer-columns > div             { flex: 1 1 160px; }
.footer-title { font-weight: 500; margin: 0 0 0.625rem; }
.footer-columns p { margin: 0 0 0.4rem; }

/* Extra padding makes the links easy to tap with a finger */
.footer-columns a { display: inline-block; padding: 0.25rem 0; }
.social a { margin-right: 0.5rem; padding: 0.5rem 0.5rem 0.5rem 0; text-decoration: none; }
.social img { width: 24px; height: 24px; vertical-align: middle; }
.social a:hover img { opacity: 0.6; }
.copyright { margin-top: 2rem; color: var(--contrast-2); font-size: 0.85rem; }

/* =========================================================
   Menu page
   ========================================================= */

.menu-page { max-width: 1280px; margin: 0 auto; padding: 1.5rem; }

.menu-page h1 {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  text-align: center;
  margin: 0 0 1rem;
}

.back {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 1rem;
}
.back:hover { color: var(--accent); }

/* The menu is drawn page by page onto a canvas, see js/menu.js */
/* --page-ratio is the shape of a menu page, set by the script once it is read.
   On a wide screen it keeps a page roughly within the height of the window
   instead of letting it grow to the full width. A phone always gets the lot. */
.menu-pages {
  width: min(100%, calc(90vh * var(--page-ratio, 0.7)));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.menu-sheet {
  width: 100%;
  height: auto;            /* the height follows from the shape of the page */
  display: block;
  border-radius: 1rem;
  background: var(--base-2);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

/* Faded in once it has been drawn, so a blank page never flashes into view */
.menu-sheet { opacity: 0; transition: opacity 0.2s ease; }
.menu-sheet.is-drawn { opacity: 1; }

/* Holds a page and the links from the PDF that are laid over it */
.menu-frame {
  position: relative;
  width: 100%;
}

/* A link from the PDF, invisible, sitting on top of the button drawn on the page */
.menu-link {
  position: absolute;
  display: block;
  border-radius: 0.5rem;
  -webkit-tap-highlight-color: rgba(194, 169, 144, 0.35);
}
.menu-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.menu-status,
.menu-download {
  text-align: center;
  color: var(--contrast-2);
  margin: 1.25rem 0 0;
}

.menu-download a { color: var(--contrast-2); }
.menu-download a:hover { color: var(--accent); }

/* =========================================================
   Phones and small screens (600px wide or less)
   Everything above already stretches; these rules just make
   the spacing tighter and stack the footer in one column.
   ========================================================= */
@media (max-width: 600px) {

  body { font-size: 1rem; }

  header { padding: 12px; }
  header img { width: 120px; }

  .hero { padding: 1.5rem 1rem 2rem; }
  .hero p { margin-bottom: 1.5rem; }
  .hero-image { border-radius: 0.5rem; }

  .newsletter { margin: 0 1rem 2rem; padding: 2rem 1rem; }

  footer { padding: 1.5rem 1rem; }
  .footer-columns { gap: 1.5rem; }
  .footer-columns > div,
  .footer-columns > div:first-child { flex: 1 1 100%; }  /* one column per row */
  .copyright { margin-top: 1.5rem; }

  .menu-page { padding: 0.75rem; }
  .menu-pages { gap: 0.75rem; }
  .menu-sheet { border-radius: 0.5rem; }
}
