/* ==========================================================
   css.css  –  Vegard Foyn, Naprapat (forslag 5)
   Shared by all pages in this folder.
   Based on forslag 4, with a new header and a one-screen
   front page (the "splash").
   ========================================================== */

/* ==========================================
   1. GLOBAL DESIGN SETTINGS
   Colors, fonts, and general sizing.
   Change values here to restyle the whole site.
========================================== */
:root {
  --bg: #f4efe6;          /* page background (warm beige) */
  --bg-alt: #ebe4d6;      /* alternate section background */
  --card: #fbf8f2;
  --green: #07382b;       /* dark green from the logo */
  --green-2: #1d5a47;     /* lighter green for hover */
  --sage: #d5ddcf;
  --text: #1c2a25;
  --muted: #5b6860;
  --beige-button: #e9dcc7; /* header bar + booking button. Adjust to match the mockup exactly */
  --radius: 14px;
  --header-h: 76px;

  /* Which part of the front-page photo stays visible when it is cropped.
     First number = left/right, second = up/down (0% to 100%).
     Change these when the final photos arrive. */
  --hero-focus-mobile: 34% 30%;
  --hero-focus-desktop: 50% 8%;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.6; color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--green); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { color: var(--green); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: 0; }
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }


/* ==========================================
   2. BUTTONS
========================================== */
.btn { display: inline-block; padding: 0.8rem 1.6rem; background: var(--green); color: #fff; border: 2px solid var(--green); border-radius: 999px; font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--green-2); border-color: var(--green-2); }
.btn.ghost { background: transparent; color: var(--green); }
.btn.ghost:hover { background: var(--green); color: #fff; }
.btn.light { background: var(--bg); color: var(--green); border-color: var(--bg); }


/* ==========================================
   3. HEADER AND MENU
   Beige bar with the logo and a green menu button.
   The same on every page, and stays at the top.
   The menu opens as a panel on ALL screen sizes
   (it uses a hidden checkbox, so no JavaScript is needed).
========================================== */
.site {
  position: sticky; top: 0; z-index: 50;
  background: var(--beige-button);
  border-bottom: 1px solid rgba(7, 56, 43, 0.12);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo img { height: 52px; width: auto; }

/* The hidden checkbox that remembers if the menu is open */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

/* The menu button: a green outlined pill with three thin lines */
.burger {
  width: 56px; height: 44px;
  display: grid; place-content: center; gap: 6px;
  border: 2px solid var(--green); border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s;
}
.burger:hover { background: rgba(7, 56, 43, 0.08); }
.burger span, .burger::before, .burger::after {
  content: ""; display: block; width: 22px; height: 2px;
  background: var(--green); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
/* When the menu is open, the three lines turn into an X */
.nav-toggle:checked ~ .burger span { opacity: 0; }
.nav-toggle:checked ~ .burger::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle:checked ~ .burger::after { transform: translateY(-8px) rotate(-45deg); }
/* Visible outline when using the keyboard */
.nav-toggle:focus-visible ~ .burger { outline: 3px solid var(--green); outline-offset: 3px; }

/* The menu panel (hidden until the button is pressed) */
.site nav {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  flex-direction: column; gap: 1rem; padding: 1.25rem;
  background: var(--beige-button);
  border-bottom: 1px solid rgba(7, 56, 43, 0.12);
  box-shadow: 0 18px 30px rgba(7, 56, 43, 0.12);
}
.nav-toggle:checked ~ nav { display: flex; animation: menu-in 0.25s ease-out; }
.site nav ul { display: flex; flex-direction: column; gap: 0.2rem; }
.site nav li a { display: block; padding: 0.6rem 0; text-decoration: none; font-weight: 600; color: var(--text); }
.site nav li a:hover { color: var(--green-2); }
.site nav li a[aria-current="page"] { color: var(--green); border-bottom: 2px solid var(--green); }
.site nav .btn { text-align: center; }


/* ==========================================
   4. FRONT PAGE (SPLASH)
   One screen, no scrolling: the header on top, and the
   photo fills all the space below it, edge to edge.
========================================== */
.splash-page { height: 100vh; height: 100svh; display: flex; flex-direction: column; overflow: hidden; }
.splash-page main { flex: 1; min-height: 0; }

.splash {
  position: relative; height: 100%;
  display: grid; align-items: end;
  background: var(--green);   /* shows briefly while the photo loads */
  overflow: hidden;
}
.splash > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--hero-focus-mobile);
}
/* Soft dark tint so the white text is easy to read.
   On phones the tint is at the bottom, on large screens it is on the right. */
.splash::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(10, 30, 24, 0.72) 0%, rgba(10, 30, 24, 0.25) 45%, rgba(10, 30, 24, 0) 70%);
}

/* The text and booking button (phone: centered at the bottom) */
.splash-content {
  position: relative; z-index: 1;
  padding: 0 1.5rem 2.5rem;
  text-align: center; color: #fff;
  animation: splash-in 1s 0.2s ease-out both;
}
.splash-content h1 {
  color: #fff; font-weight: 300; letter-spacing: -0.01em; line-height: 1.12;
  font-size: clamp(2.1rem, 8vw, 3rem);
  margin: 0 0 1.2rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}
/* The thin line between the title and the button */
.splash-rule { display: block; width: 72px; height: 1px; margin: 0 auto 1.6rem; background: rgba(255, 255, 255, 0.85); }

/* The booking button, in the same beige as the header */
.booking-button {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.95rem 2.2rem;
  background: var(--beige-button); color: var(--green);
  border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
}
.booking-button:hover { background: #f3eadb; transform: translateY(-2px); }
.booking-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.booking-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }


/* ==========================================
   5. PAGE HEADER ON SUB PAGES
========================================== */
.page-head { background: var(--bg-alt); padding: 3.5rem 0 3rem; }
.page-head p { max-width: 60ch; font-size: 1.1rem; margin: 0; }


/* ==========================================
   6. SECTIONS AND LAYOUTS (sub pages)
========================================== */
.section { padding: 4rem 0; }
.alt { background: var(--bg-alt); }

.icon { width: 64px; height: 64px; border-radius: 50%; background: var(--sage); display: grid; place-items: center; margin: 0 auto 0.7rem; }
.icon svg { width: 30px; height: 30px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.split { display: grid; gap: 2rem; align-items: center; }
.split img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
.split .portrait-img { aspect-ratio: 4 / 5; object-position: center top; }

.cards { display: grid; gap: 1rem; }
.card { background: var(--card); border-radius: var(--radius); padding: 1.5rem; }
.card .icon { margin: 0 0 0.9rem; }
.card p:last-child { margin-bottom: 0; }

.list li { padding: 0.55rem 0 0.55rem 1.6rem; position: relative; }
.list li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.plain li { padding: 0.7rem 0; border-bottom: 1px solid rgba(7, 56, 43, 0.12); }
.plain li:last-child { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { padding: 0.45rem 0.9rem; border-radius: 999px; background: var(--sage); font-weight: 600; font-size: 0.95rem; }

.steps { counter-reset: s; display: grid; gap: 1rem; }
.steps li { counter-increment: s; background: var(--card); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.25rem 4.2rem; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 1.1rem; top: 1.2rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; }
.steps p { margin: 0; }

.cta { background: var(--green); color: #fff; text-align: center; padding: 4rem 0; }
.cta h2 { color: #fff; }
.cta p { max-width: 50ch; margin: 0 auto 1.5rem; opacity: 0.9; }

.contact-grid { display: grid; gap: 1rem; }


/* ==========================================
   7. FOOTER (sub pages)
========================================== */
.foot { background: var(--green); color: #e8e2d4; padding: 3rem 0 2rem; font-size: 0.95rem; }
.foot a { color: #fff; }
.foot-grid { display: grid; gap: 1.75rem; margin-bottom: 2rem; }
.foot h3 { color: #fff; font-size: 1rem; margin-bottom: 0.6rem; }
.foot li { padding: 0.15rem 0; }
.foot small { opacity: 0.7; }


/* ==========================================
   8. ANIMATIONS
   Everything is switched off for visitors who prefer less motion.
========================================== */
/* Sub pages: fade-in on scroll (script.js adds "in"; without JS content just shows) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease-out, transform 0.55s ease-out; will-change: opacity, transform; }
.js .reveal.in { opacity: 1; transform: none; will-change: auto; }

/* Menu panel appears */
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Front page: the text fades in once when the page opens */
@keyframes splash-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .nav-toggle:checked ~ nav { animation: none; }
  .splash-content { animation: none; }
  .burger, .burger span, .burger::before, .burger::after, .booking-button { transition: none; }
}


/* ==========================================
   9. RESPONSIVE DESIGN
   Larger screens, from small to large.
========================================== */

/* Tablet and up: menu becomes a card in the top right corner */
@media (min-width: 700px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr; }

  .site nav {
    left: auto; width: 320px;
    right: max(1.25rem, calc((100vw - 1120px) / 2 + 1.25rem));
    border: 1px solid rgba(7, 56, 43, 0.12); border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
  }
}

/* Sub pages: two-column layouts on wider screens */
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .split.rev > :first-child { order: 2; }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

/* Front page on desktop (and on phones held sideways):
   text moves to the right of the photo, left-aligned, like the mockup */
@media (min-width: 900px), (orientation: landscape) and (max-height: 520px) {
  .splash { align-items: center; justify-items: end; }
  .splash > img { object-position: var(--hero-focus-desktop); }
  .splash::after { background: linear-gradient(270deg, rgba(10, 30, 24, 0.4) 0%, rgba(10, 30, 24, 0) 55%); }

  .splash-content {
    width: min(30rem, 38%);
    padding: 0 clamp(1.5rem, 6vw, 6rem) 0 0;
    text-align: left;
  }
  .splash-content h1 { font-size: clamp(2rem, 3.6vw, 4rem); }
  .splash-rule { margin-left: 0; }
}