/* ==========================================================
   css_vegard.css  –  Vegard Foyn, Naprapat (version 3)
   Shared by all pages.
   ========================================================== */

/* 1. Colors and basics */
:root {
  --bg: #f4efe6;        /* warm beige */
  --bg-alt: #ebe4d6;
  --card: #fbf8f2;
  --green: #07382b;     /* from the VF logo */
  --green-2: #1d5a47;
  --sage: #d5ddcf;
  --text: #1c2a25;
  --muted: #5b6860;
  --radius: 14px;
  --header-h: 76px;
}
* { 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; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 0.6rem; }

/* 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 (same on every page, stays at the top) */
.site { position: sticky; top: 0; z-index: 50; background: rgba(244, 239, 230, 0.95); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(7, 56, 43, 0.1); }
.bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo img { height: 56px; width: auto; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.burger { width: 44px; height: 44px; display: grid; place-content: center; gap: 6px; cursor: pointer; }
.burger span, .burger::before, .burger::after { content: ""; display: block; width: 26px; height: 3px; background: var(--green); border-radius: 2px; }
.site nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 1rem; padding: 1.25rem; background: var(--bg); border-bottom: 1px solid rgba(7, 56, 43, 0.1); }
.nav-toggle:checked ~ nav { display: flex; }
.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[aria-current="page"] { color: var(--green); border-bottom: 2px solid var(--green); }
.site nav .btn { text-align: center; }

/* 4. Hero (home) */
.hero { position: relative; min-height: 560px; display: flex; align-items: flex-start; overflow: hidden; background: var(--bg-alt); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(244,239,230,0.95) 0%, rgba(244,239,230,0.65) 55%, rgba(244,239,230,0) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 3rem; }
.hero-copy { max-width: 520px; }
.hero-copy p { font-size: 1.1rem; max-width: 40ch; margin-bottom: 1.5rem; }

/* 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 */
.section { padding: 4rem 0; }
.alt { background: var(--bg-alt); }
.center { text-align: center; }

.features { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; text-align: center; }
.features a { text-decoration: none; color: var(--text); }
.features strong { display: block; color: var(--green); }
.features span { font-size: 0.92rem; color: var(--muted); }
.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; }

.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.badges li { display: flex; gap: 0.7rem; align-items: center; font-size: 0.92rem; line-height: 1.35; }
.badges .icon { width: 46px; height: 46px; margin: 0; flex: none; }
.badges .icon svg { width: 22px; height: 22px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.tiles li:last-child { grid-column: span 2; }
.tile { position: relative; display: block; aspect-ratio: 1 / 1.1; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; font-weight: 700; }
.tiles li:last-child .tile { aspect-ratio: 2 / 1; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.tile:hover img { transform: scale(1.05); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.6), rgba(0,0,0,0) 55%); }
.tile span { position: absolute; left: 1rem; bottom: 0.9rem; right: 1rem; z-index: 1; line-height: 1.2; }

.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 */
.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. Fade-in on scroll (script_vegard.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; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* 9. Larger screens */
@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; }
}
@media (min-width: 900px) {
  .features { grid-template-columns: repeat(4, 1fr); }
  .badges { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(5, 1fr); gap: 1rem; }
  .tiles li:last-child { grid-column: auto; }
  .tiles li:last-child .tile { aspect-ratio: 1 / 1.1; }
  .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); }
  .hero { min-height: 620px; align-items: center; }
  .hero .wrap { padding-top: 0; }
  .hero::after { background: linear-gradient(90deg, rgba(244,239,230,1) 0%, rgba(244,239,230,0.88) 32%, rgba(244,239,230,0) 68%); }
}
@media (min-width: 1020px) {
  .burger { display: none; }
  .site nav { display: flex; position: static; flex-direction: row; align-items: center; gap: 1.75rem; padding: 0; background: none; border: 0; }
  .site nav ul { flex-direction: row; gap: 1.6rem; }
  .site nav li a { padding: 0.3rem 0; font-size: 0.95rem; }
}
