/* ==========================================================================
   Μαγιόλικα — majolica.gr
   Hand-written CSS. Palette drawn from terracotta, clay dust and a muted glaze.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin + greek subsets) ---------- */
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/ebgaramond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/ebgaramond-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* ---------- Tokens ---------- */
:root {
  --surface: #fbf8f3;
  --surface-2: #f2ebe1;
  --line: #e3d9ca;
  --ink: #2a2420;
  --ink-2: #5c524a;
  --ink-3: #8a7d72;
  --primary: #9a4a2b;
  --primary-hover: #7e3a20;
  --accent: #3f6f6b;
  --dark: #2a2420;
  --on-dark: #f2ebe1;
  --on-dark-muted: #cfc3b3;

  --font-display: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgb(42 36 32 / 0.06), 0 1px 3px rgb(42 36 32 / 0.08);
  --shadow: 0 10px 30px -10px rgb(42 36 32 / 0.25);
  --container: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.5rem; }
p { margin: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--primary-hover); }
address { font-style: normal; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--primary); color: var(--surface); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #fff; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn--sm { min-height: 2.5rem; padding: 0.5rem 1.05rem; font-size: 0.92rem; }
.btn--lg { min-height: 3.25rem; padding: 0.85rem 1.75rem; font-size: 1.05rem; }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgb(42 36 32 / 0.22); }
.btn--ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn--light { background: var(--on-dark); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); transform: translateY(-1px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(251 248 243 / 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
}
.brand:hover { color: var(--ink); }

.nav { display: none; gap: 2rem; }
.nav a {
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.nav a:hover { color: var(--primary); border-color: var(--primary); }

.site-header__actions { display: flex; align-items: center; gap: 0.75rem; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.5rem;
  padding: 0 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.lang-switch:hover { color: var(--primary); border-color: var(--primary); }
.site-header__socials { display: flex; align-items: center; gap: 0.1rem; }
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: var(--ink-2);
  transition: color 0.18s ease, background-color 0.18s ease;
}
.icon-link:hover { color: var(--primary); background: var(--surface-2); }

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.menu-btn:hover { background: var(--surface-2); }
.menu-btn__close { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__open { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__close { display: block; }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem var(--gutter) 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a:not(.btn) {
  padding: 0.75rem 0.5rem;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.mobile-nav a:not(.btn):hover { background: var(--surface-2); color: var(--primary); }

@media (min-width: 900px) {
  .nav { display: flex; }
  .menu-btn, .mobile-nav { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(1.75rem, 8vw, 6rem) clamp(2.5rem, 7vw, 5rem); overflow: hidden; }
.hero__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.hero__title { margin-top: 0.25rem; }
.hero__subtitle {
  margin-top: 1.1rem;
  max-width: 34rem;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
@media (max-width: 479px) {
  .hero__actions .btn { flex: 1 1 0; padding-inline: 0.9rem; font-size: 1rem; }
  .eyebrow { font-size: 0.72rem; letter-spacing: 0.14em; }
}
@media (min-width: 900px) {
  .hero__actions { margin-top: 2.2rem; gap: 0.85rem; }
}
.hero__figure {
  position: relative;
  margin: 0;
  max-width: 30rem;
  width: 100%;
  justify-self: center;
}
.hero__figure::before {
  content: "";
  position: absolute;
  inset: 10% -8% -6% 12%;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  z-index: 0;
}
.hero__img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; }
  .hero__figure { justify-self: end; max-width: 34rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--alt { background: var(--surface-2); }
.section__header { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__header--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1.5rem; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card__body { padding: 1.5rem 1.5rem 1.75rem; }
.card__body h3 { margin-bottom: 0.6rem; }
.card__body p { color: var(--ink-2); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Banners ---------- */
.banner { margin: 0; }
.banner__img {
  width: 100%;
  height: clamp(200px, 30vw, 420px);
  object-fit: cover;
}

/* ---------- Gallery grid ---------- */
.grid { display: grid; gap: 0.9rem; }
.grid--gallery { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid--gallery { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.grid__link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow-sm);
}
.grid__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.grid__link:hover .grid__img { transform: scale(1.04); }

/* ---------- CTA band ---------- */
.cta {
  background: var(--dark);
  color: var(--on-dark);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.cta__inner { max-width: 44rem; text-align: center; }
.cta h2 { color: #fff; }
.cta p { margin: 1.2rem auto 2rem; font-size: 1.1rem; color: var(--on-dark-muted); max-width: 32rem; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: start; } }
.contact__email { width: 100%; white-space: normal; text-align: center; }
@media (min-width: 480px) { .contact__email { width: auto; } }
.contact__list {
  margin: 2rem 0 0;
  display: grid;
  gap: 1.25rem;
}
.contact__list dt {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.contact__list dd { margin: 0.25rem 0 0; font-size: 1.05rem; }
.contact__list dd a { color: var(--ink); text-decoration: none; }
.contact__list dd a:hover { color: var(--primary); text-decoration: underline; }
.contact__social { display: flex; gap: 1rem; }

.map {
  position: relative;
  height: clamp(260px, 42vw, 400px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.map__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--ink-2);
  font-weight: 500;
}
.map--loaded .map__fallback { display: none; }
.map__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
  border-radius: var(--radius);
}
.map__overlay:focus-visible { outline-offset: -3px; }
.map .maplibregl-ctrl-bottom-right { z-index: 2; }
.map .maplibregl-ctrl-attrib { font-size: 11px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding-block: 3rem 1.75rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.site-footer__inner {
  display: grid;
  gap: 2rem;
}
@media (min-width: 720px) { .site-footer__inner { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer__brand .brand { font-size: 1.5rem; }
.site-footer__brand p + p { margin-top: 0.4rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.site-footer__address { line-height: 1.8; }
.site-footer__links { display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(20 16 14 / 0.94);
  color: #fff;
}
.lightbox:not([open]) { display: none; }
.lightbox::backdrop { background: transparent; }
.lightbox__figure {
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 4rem 1rem 2rem;
}
.lightbox__img {
  max-width: min(100%, 1200px);
  max-height: calc(100vh - 6rem);
  max-height: calc(100dvh - 6rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.lightbox__btn {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.18s ease;
}
.lightbox__btn:hover { background: rgb(255 255 255 / 0.25); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
body.lightbox-open { overflow: hidden; }

/* ---------- 404 ---------- */
.notfound { max-width: 40rem; text-align: center; padding-block: 3rem; }
.notfound p { margin-top: 0.75rem; color: var(--ink-2); }
.notfound__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }

/* ---------- Reveal (progressive enhancement) ---------- */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
