/* Poulimenos Handmade — shared tokens, site header and site footer (used by every page) */

@font-face {
  font-family: Sansation_Regular_gr;
  src: url(../resources/fonts/Sansation-Regular-gr.ttf);
  font-display: swap;
}

:root {
  --ground: #f7f4ee;
  --surface: #ffffff;
  --sand: #efebe2;
  --line: #e6e1d6;
  --line-strong: #c9c2b3;
  --ink: #1a1c1a;
  --ink-soft: #4a4d46;
  --ink-muted: #5e6158;
  --green: #1e4436;
  --green-dark: #122b22;
  --brass: #8a6a2e;        /* brass for text on light backgrounds (4.6:1) */
  --brass-light: #c9a45c;  /* brass for dark backgrounds, lines and accents */
  --charcoal: #1c1f1d;
  --forest: #14231c;
  --footer: #0f1612;
  --title: #1e4436;
  --title-2: #1a1c1a;
  --display: Sansation_Regular_gr, "Didact Gothic", sans-serif;
  --sans: "Manrope", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-top: 3px solid var(--brass-light);
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

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

.site-header a,
.site-header button {
  font-family: inherit;
}

/* brand | nav | flag ……… phone — brand and nav on the left, the language flag right after the
   last menu item, the phone button pinned to the right edge */
.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  column-gap: 32px;
  min-height: 76px;
}

.header-actions {
  grid-column: 3;
  margin-left: -10px; /* the language button has its own padding; keeps it as close as a menu item */
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  display: block;
  height: 64px;
  width: auto;
  margin: 0;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px 24px;
  font-size: 15px;
  font-weight: 600;
}

.main-nav li {
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--ink);
  font-size: inherit;
  text-decoration: none;
  white-space: nowrap;
}

/* hover: quiet green underline — the brass underline is reserved for the current page */
.main-nav a:hover {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
}

.main-nav a[aria-current="page"] {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--brass-light);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.brand,
.header-actions {
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language: flag + code of the OTHER language ("🇬🇧 EN" on Greek pages, "🇬🇷 EL" on English ones).
   Both buttons stay in the HTML for the scripts and screen readers ("English" / "Ελληνικά");
   the active one is hidden. */
.lang-switch {
  display: flex;
  align-items: center;
  margin-right: auto; /* pushes the phone button to the right edge */
}

.lang-switch button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.lang-switch button:hover {
  color: var(--green);
}

.lang-switch button::before {
  content: "";
  display: block;
  flex: none;
  width: 24px;
  height: 16px;
  border-radius: 3px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 0 0 1px rgba(26, 28, 26, 0.14);
  transition: transform 0.2s ease;
}

.lang-switch button[data-lang="gr"]::before {
  background-image: url(../resources/images/flags/gr.svg);
}

.lang-switch button[data-lang="en"]::before {
  background-image: url(../resources/images/flags/gb.svg);
}

.lang-switch button:hover::before {
  transform: scale(1.08);
}

.lang-switch button[aria-pressed="true"] {
  display: none;
}

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .header-call:hover {
  background: var(--green-dark);
  color: #fff;
}

.site-header .header-call {
  color: #fff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.site-header :focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (max-width: 1400px) and (min-width: 1231px) {
  .header-inner {
    column-gap: 28px;
  }

  .brand img {
    height: 52px;
  }

  .main-nav ul {
    gap: 8px 16px;
    font-size: 14px;
  }

  .header-call {
    padding: 0 14px;
  }
}

@media (max-width: 1230px) {
  .menu-toggle {
    display: inline-flex;
  }

  .header-actions {
    justify-content: flex-end;
    margin-left: 0;
  }

  .lang-switch {
    margin-right: 0;
  }

  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -20px rgba(20, 35, 28, 0.35);
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    font-size: 17px;
  }

  .main-nav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    border-bottom: 1px solid var(--sand);
  }
}

@media (max-width: 720px) {
  .brand img {
    height: 46px;
  }

  .header-inner {
    min-height: 64px;
  }

  .header-call {
    display: none;
  }

}

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

.site-footer {
  position: static;
  margin: 0;
  padding: 0;
  background: var(--footer);
  color: #d9ddd6;
  border-top: 3px solid var(--brass-light);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

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

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 32px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 320px;
}

.footer-brand img {
  display: block;
  margin: 0;
  max-width: 100%;
  height: 76px;
  width: auto;
  align-self: flex-start;
}

.footer-brand p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #aeb5ac;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  font-size: 15px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h2 {
  margin: 0;
  font-family: var(--sans);
  font-stretch: normal;
  text-align: left;
  line-height: 1.5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-light);
}

.site-footer a {
  color: #d9ddd6;
  font-family: inherit;
  font-size: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  border-top: 1px solid #26312b;
  font-size: 13px;
  color: #8f978d;
}

.footer-bottom p {
  margin: 0;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* ---------- Back to top button (created by header.js) ---------- */

.to-top-button {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--brass-light);
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(20, 32, 28, 0.8);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background-color 0.2s ease;
}

.to-top-button.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top-button:hover {
  background: var(--green-dark);
}

.to-top-button:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .to-top-button {
    right: 16px;
    bottom: 20px;
  }

  /* pages with the bottom contact bar: sit above it */
  .has-quick-bar .to-top-button {
    bottom: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-top-button {
    transition: none;
  }
}

/* ---------- Reveal on scroll (classes added by header.js) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Product-page hero photo settles in gently on load */
.about picture {
  display: block;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .about-image {
    animation: hero-settle 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
}

@keyframes hero-settle {
  from {
    transform: scale(1.06);
  }
  to {
    transform: none;
  }
}

/* ---------- Cookie notice (built by header.js) ---------- */

.cookie-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 60;
  width: min(420px, calc(100vw - 40px));
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass-light);
  border-radius: 10px;
  box-shadow: 0 18px 40px -18px rgba(20, 35, 28, 0.45);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  text-align: left;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
}

.cookie-title {
  margin-bottom: 6px !important;
  font-weight: 700;
  font-size: 15px;
}

.cookie-text {
  color: var(--ink-soft);
}

.cookie-text a {
  color: var(--green);
  font-family: inherit;
  font-weight: 700;
}

.cookie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

/* equal weight for both choices (GDPR) */
.cookie-btn {
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cookie-accept {
  border: 1.5px solid var(--green);
  background: var(--green);
  color: #fff;
}

.cookie-accept:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.cookie-reject {
  border: 1.5px solid var(--green);
  background: transparent;
  color: var(--green);
}

.cookie-reject:hover {
  background: rgba(30, 68, 54, 0.08);
}

.cookie-btn:focus-visible,
.cookie-text a:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 3px;
}

/* footer link that reopens the notice */
.site-footer .cookie-settings {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #d9ddd6;
  font: inherit;
  cursor: pointer;
}

.site-footer .cookie-settings:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 720px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  /* pages with the bottom contact bar: sit above it */
  .has-quick-bar .cookie-banner {
    bottom: 92px;
  }

  /* while the notice is open, the back-to-top button would overlap it */
  .has-cookie-banner .to-top-button {
    display: none;
  }
}

/* room under the page while the cookie notice is open (value set by header.js) */
body.has-cookie-banner .site-footer {
  padding-bottom: var(--cookie-space, 0px);
}
