/* ─────────────────────────────────────────────────────────────
   FOLKEFERD — Shared Stylesheet
   Fonts: Libre Baskerville (titles) · Almarai (body + labels)
          Cormorant Garamond italic (quotes)
───────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Almarai:wght@300;400;700&family=Cormorant+Garamond:ital,wght@1,300;1,400;1,500&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --gold:         #C4973B;
  --gold-light:   #D9B468;
  --gold-pale:    #EDD99A;
  --gold-dark:    #8B6520;
  --leather-red:  #7A2020;
  --leather-mid:  #5C1A1A;
  --leather-dark: #3A0E0E;
  --ink:          #1A1008;
  --parchment:    #F4EAD5;
  --parchment-dk: #E8D9BE;
  --warm-white:   #E0CBAA;
  --text-body:    #2E1E0F;

  /* Font families */
  --font-title:   'Libre Baskerville', Georgia, serif;
  --font-body:    'Almarai', sans-serif;
  --font-italic:  'Cormorant Garamond', Georgia, serif;

  --nav-h: 70px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 17px;
  scroll-behavior: smooth;
  /* Prevent iOS from bumping font sizes on rotate */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent content from overflowing horizontally on mobile */
  overflow-x: hidden;
}

/* Remove blue flash on tap (Android/iOS) */
* { -webkit-tap-highlight-color: rgba(0,0,0,0); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* Ensure buttons/links have pointer cursor everywhere */
button, [role="button"], a { cursor: pointer; }

/* ── Navigation ─────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  background: transparent;
  transition: background 0.4s ease, border-bottom 0.4s ease;
}

.site-nav.scrolled {
  background: rgba(26, 8, 4, 0.93);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(196, 151, 59, 0.2);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.nav-logo svg  { width: 34px; height: 34px; }

/* Real logo image — mix-blend-mode: screen makes the black bg invisible,
   leaving only the white seal. Works on any dark surface. */
.logo-img {
  display: block;
  mix-blend-mode: screen;
}
.nav-logo-name {
  font-family: var(--font-title);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--parchment);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(244, 234, 213, 0.75);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links a:hover { color: var(--parchment); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--parchment); }

/* ── Page sections ──────────────────────────────────────── */
.section--dark     { background: var(--ink);        color: var(--parchment); }
.section--parchment{ background: var(--parchment); }
.section--warm     { background: var(--warm-white); }

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 2rem;
}
.container--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Typography ─────────────────────────────────────────── */

/* Eyebrow / secondary label — Almarai uppercase */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}

/* Titles — Libre Baskerville, never all-caps */
h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.2;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

/* Body — Almarai */
p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-body);
}
p + p { margin-top: 1.1em; }

/* Lead / intro paragraph */
.lead {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
}

/* Italic / quote — Cormorant Garamond italic */
blockquote, .quote-text, .italic-text {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 300;
}

/* Divider rule */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 2.5rem auto;
  max-width: 360px;
  opacity: 0.6;
}

/* ── Button ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.85rem 2.2rem;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
  text-decoration: none;
}
.btn:hover {
  background: var(--gold);
  color: var(--ink);
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--ink);
  color: rgba(244, 234, 213, 0.5);
  padding: 3rem 2rem;
  text-align: center;
}
footer p {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 2;
  color: var(--gold);
}
footer a { color: var(--gold); }
footer .footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin: 1.5rem 0;
}
footer .footer-nav a {
  font-family: var(--font-title);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(244, 234, 213, 0.5);
  transition: color 0.2s;
}
footer .footer-nav a:hover { color: var(--gold-light); }

/* ── Floating artifacts ─────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px)   rotate(0deg); }
  33%       { transform: translateY(-12px) rotate(0.4deg); }
  66%       { transform: translateY(-6px)  rotate(-0.3deg); }
}
.artifact {
  display: block;
  margin: 0 auto 2.8rem;
  max-width: 200px;
  width: 32%;
  animation: float 7s ease-in-out infinite;
  filter: drop-shadow(0 14px 32px rgba(10,3,0,0.38));
  position: relative;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}
/* Size variants */
.artifact--sm { max-width: 150px; width: 22%; }
.artifact--lg { max-width: 270px; width: 42%; }
/* Offset the start time on each instance so they don't all bob in sync */
.artifact:nth-of-type(2) { animation-delay: -2.3s; }
.artifact:nth-of-type(3) { animation-delay: -4.7s; }

/* ── Scroll reveal ──────────────────────────────────────── */
/*
   Elements get .reveal added by JS if they are below the fold.
   .visible is added by IntersectionObserver when they enter view.
   cubic-bezier(0.16, 1, 0.3, 1) = snappy ease-out (like iOS spring).
*/
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity  0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Inclusions section (shared across pages) ───────────── */
.inclusions { background: var(--ink); color: var(--parchment); padding: 5rem 0; }
.inclusions h2 { color: var(--parchment); text-align:center; margin-bottom:3rem; }
.inclusions-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem 4rem; max-width: 820px; margin:0 auto; padding:0 2rem;
}
.incl-group h4 {
  font-family: var(--font-body); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(196,151,59,0.2);
}
.incl-group ul { list-style: none; }
.incl-group li {
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 300;
  color: rgba(244,234,213,0.7); padding: 0.4rem 0;
  display: flex; gap: 0.7rem; align-items: baseline;
}
.incl-group li::before { content:'-'; color:var(--gold); flex-shrink:0; font-size:0.75rem; }
.incl-group--no li { color:rgba(244,234,213,0.38); }
.incl-group--no li::before { color:rgba(196,151,59,0.3); }
.napoli-note { max-width: 820px; margin: 3rem auto 0; padding: 0 2rem; }
.napoli-note p {
  font-family: var(--font-body); font-size: 1.05rem;
  color: rgba(244,234,213,0.7); line-height: 1.9;
}
@media(max-width:820px){
  .inclusions-grid { grid-template-columns:1fr; gap:2rem; }
}

/* ── Language toggle button ─────────────────────────────── */
.lang-toggle {
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: none;
  border: 1px solid rgba(244,234,213,0.3);
  color: rgba(244,234,213,0.55);
  padding: 0.28rem 0.6rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  line-height: 1;
  flex-shrink: 0;
}
.lang-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── i18n visibility ─────────────────────────────────────── */
/* Default (Norwegian): hide English blocks */
.lang-en { display: none; }
/* English mode: hide Norwegian, reveal English */
html.lang-active-en .lang-no { display: none; }
html.lang-active-en .lang-en { display: revert; }

/* ── Hamburger (mobile) ─────────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--parchment);
  margin: 6px 0;
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 700px) {
  .site-nav { padding: 0 1.5rem; }
  .nav-toggle { display: block; z-index: 101; }
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 70vw; height: 100vh;
    background: rgba(26, 8, 4, 0.97);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transition: right 0.4s ease;
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 0.9rem; }
  .container { padding: 0 1.25rem; }

  /* Footer nav — one line, centred, breathing room from edges */
  footer .footer-nav {
    gap: 1.2rem;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 0 1.5rem;
  }
  footer .footer-nav a {
    font-size: 0.38rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
  }
}
