/* ============================================================
   KAPELLAN — Vesturhlíð 7 · brand tokens + landing styles
   ============================================================ */

:root {
  --ink: #131f17;
  --pine: #1d3226;
  --moss: #486b52;
  --sage: #8aa892;
  --bone: #f5f1e6;
  --paper: #fbf9f2;
  --lime: #c9e265;
  --gold: #b98a2e;
  --serif: "Lora", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lime); color: var(--ink); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- typography ---------- */

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.008em;
}

/* grain texture on dark surfaces */
.grain { position: relative; }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  opacity: 0.5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
}

.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.section-head { margin-bottom: 48px; }
.section-head .eyebrow { color: var(--moss); margin-bottom: 16px; }
.section-head h2 { font-size: clamp(28px, 3.8vw, 46px); }
.section-head p.lead { font-size: 19px; max-width: 560px; margin-top: 20px; color: #3c4a41; }

/* ---------- nav ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled { background: rgba(251,249,242,0.94); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(19,31,23,0.15); }
.nav .brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.nav .brand svg { width: 34px; height: 34px; }
.nav .brand .name { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 0.02em; }
.nav .links { display: flex; gap: 28px; align-items: center; }
.nav .links a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; opacity: 0.85; }
.nav .links a:hover { opacity: 1; }
.nav .links a.cta {
  background: var(--lime); color: var(--ink); padding: 11px 18px; border-radius: 3px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; opacity: 1;
}
.nav .links a.cta:hover { background: var(--moss); color: var(--bone); }
@media (max-width: 860px) { .nav .links a:not(.cta) { display: none; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; padding: 17px 30px; border-radius: 3px;
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  text-decoration: none; transition: transform 0.12s, box-shadow 0.12s, background 0.2s;
  border: 2px solid var(--ink);
}
.btn.primary { background: var(--lime); color: var(--ink); box-shadow: 5px 5px 0 rgba(19,31,23,0.12); }
.btn.primary:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(201,226,101,0.45); }
.btn.ghost { border-color: var(--bone); color: var(--bone); }
.btn.ghost:hover { background: var(--bone); color: var(--ink); }
.btn.dark { background: var(--ink); color: var(--bone); border-color: var(--ink); box-shadow: 5px 5px 0 rgba(19,31,23,0.25); }
.btn.dark:hover { transform: translate(-2px, -2px); }

/* ---------- hero ---------- */

.hero {
  position: relative; min-height: 64svh;
  background: var(--paper);
  color: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}
.hero .inner { max-width: var(--max); margin: 0 auto; width: 100%; position: relative; z-index: 2; }
.hero .eyebrow { color: var(--moss); margin-bottom: 24px; }
.hero h1 {
  font-size: clamp(38px, 6.5vw, 84px);
  max-width: 14ch;
}
.hero h1 em { font-style: italic; color: var(--moss); }
.hero p.sub { font-size: clamp(17px, 2vw, 21px); max-width: 620px; margin: 28px 0 36px; color: #3c4a41; }
.hero .ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* bubbles — sódavatn */
.bubbles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.bubble {
  position: absolute; bottom: -40px; border-radius: 50%;
  border: 1px solid rgba(245, 241, 230, 0.22);
  background: radial-gradient(circle at 35% 30%, rgba(245,241,230,0.13), rgba(245,241,230,0.02));
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateY(-108svh) translateX(var(--drift, 20px)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; display: none; } }

/* octagon watermark in hero */
.hero .oct-mark {
  position: absolute; right: -8%; top: 50%; transform: translateY(-50%);
  width: min(58vw, 720px); height: auto; opacity: 0.07; z-index: 1;
}

/* ---------- marquee ---------- */

.marquee {
  background: var(--lime); color: var(--ink);
  overflow: hidden; white-space: nowrap;
  padding: 15px 0; font-weight: 700; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.06em;
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
}
.marquee .track { display: inline-block; animation: scroll 36s linear infinite; }
.marquee span { margin: 0 18px; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }

/* ---------- sections ---------- */

section { padding: 110px 0; }

.section-dark { background: var(--ink); color: var(--bone); }
.section-dark .section-head .eyebrow { color: var(--lime); }
.section-bone { background: var(--bone); }

/* manifesto */
.manifesto { background: var(--bone); text-align: left; }
.manifesto h2 { font-size: clamp(32px, 4.8vw, 60px); max-width: 18ch; }
.manifesto h2 em { font-style: italic; color: var(--moss); }
.manifesto p { font-size: clamp(18px, 2.2vw, 24px); max-width: 46ch; margin-top: 36px; color: #33413a; }
.manifesto .sign { margin-top: 28px; font-family: var(--serif); font-style: italic; color: var(--moss); font-size: 18px; }

/* cards grid */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 4px;
  padding: 32px 28px; box-shadow: 6px 6px 0 rgba(19,31,23,0.12);
}
.card h3 { font-size: 24px; margin-bottom: 12px; }
.card p { font-size: 15.5px; color: #4a564e; }
.card .num {
  font-family: var(--serif); font-style: italic; font-size: 15px;
  color: var(--gold); display: block; margin-bottom: 18px;
}

.section-dark .card { background: rgba(245,241,230,0.05); border-color: rgba(245,241,230,0.35); box-shadow: 6px 6px 0 rgba(245,241,230,0.08); }
.section-dark .card p { color: #b9c2ba; }

/* amenities */
.amenity { display: flex; gap: 14px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid rgba(245,241,230,0.12); }
.amenity svg { flex: none; width: 26px; height: 26px; margin-top: 3px; color: var(--lime); }
.amenity strong { display: block; font-size: 17px; }
.amenity span { font-size: 14.5px; color: #aab5ac; }

.advantage-strip {
  margin-top: 56px; border-left: 3px solid var(--lime); padding: 6px 0 6px 24px;
}
.advantage-strip .eyebrow { color: var(--pine); margin-bottom: 12px; }
.advantage-strip h3 { font-family: var(--sans); font-weight: 500; font-size: 18px; line-height: 1.5; max-width: 60ch; color: var(--ink); }
.advantage-strip p { margin-top: 14px; max-width: 60ch; font-size: 16.5px; }

/* pricing */
.price-card {
  border-radius: 4px; padding: 44px 36px; position: relative;
  display: flex; flex-direction: column; gap: 8px;
  border: 2px solid var(--ink); box-shadow: 8px 8px 0 rgba(19,31,23,0.15);
}
.price-card.featured { background: var(--ink); color: var(--bone); }
.price-card.plain { background: var(--paper); }
.price-card .tag {
  position: absolute; top: 24px; right: 24px;
  background: var(--lime); color: var(--ink);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 6px 12px; border-radius: 3px; transform: rotate(2deg); border: 2px solid var(--ink);
}
.price-card h3 { font-size: 28px; }
.price-card .amount { font-family: var(--serif); font-size: clamp(44px, 5vw, 60px); margin: 18px 0 2px; }
.price-card .amount small { font-size: 18px; font-family: var(--sans); font-weight: 500; }
.price-card .per { font-size: 14px; opacity: 0.7; margin-bottom: 22px; }
.price-card ul { list-style: none; display: grid; gap: 10px; font-size: 15.5px; }
.price-card ul li { padding-left: 26px; position: relative; }
.price-card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.price-card.featured ul li::before { color: var(--lime); }
.price-note { margin-top: 28px; font-size: 15px; color: #5a665e; max-width: 62ch; }

/* community logos */
.tenant { text-align: center; padding: 36px 20px; }
.tenant .mark { font-family: var(--serif); font-size: 28px; font-style: italic; }
.tenant p { font-size: 14px; color: #8f9a92; margin-top: 8px; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: rgba(245,241,230,0.35); border: 2px solid rgba(245,241,230,0.35); border-radius: 4px; overflow: hidden; margin-top: 56px; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.fact { background: var(--paper); padding: 34px 24px; }
.fact .big { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 44px); }
.fact span { font-size: 14px; color: #6b766e; }

/* plan svg */
.plan-holder { margin-top: 56px; background: var(--paper); border: 2px solid #e4ddc9; border-radius: 4px; padding: clamp(20px, 4vw, 48px); }
.plan-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px; font-size: 14px; color: #4a564e; }
.plan-legend i { display: inline-block; width: 13px; height: 13px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }

/* timeline / waitlist */
.waitlist { text-align: center; }
.waitlist h2 { font-size: clamp(30px, 4.2vw, 52px); max-width: 18ch; margin: 0 auto; }
.waitlist p { max-width: 52ch; margin: 20px auto 34px; font-size: 18px; color: #3c4a41; }
.waitlist .btn { font-size: 18px; padding: 20px 44px; }
.waitlist .small { font-size: 14px; margin-top: 20px; color: #8b968d; }

/* faq */
.faq details {
  border-bottom: 1px solid #e4ddc9; padding: 6px 0;
}
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--serif); font-size: clamp(19px, 2.4vw, 26px); font-weight: 600; padding: 22px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-size: 28px; color: var(--moss); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 26px; max-width: 66ch; color: #4a564e; font-size: 16.5px; }

/* footer */
footer { background: var(--ink); color: var(--bone); padding: 72px 0 40px; }
footer .cols { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
footer .brandline { display: flex; align-items: center; gap: 12px; }
footer .brandline svg { width: 30px; height: 30px; }
footer .brandline .name { font-family: var(--serif); font-size: 20px; }
footer p, footer a { font-size: 14.5px; color: #aab5ac; text-decoration: none; }
footer a:hover { color: var(--bone); }
footer .fine { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(245,241,230,0.1); font-size: 13px; color: #77837a; }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* tenant logos — recolored via mask */
.logo-row { display: flex; align-items: center; gap: clamp(32px, 5vw, 64px); flex-wrap: wrap; }
.tlogo {
  display: inline-block; background: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.tlogo.sodavatn { -webkit-mask-image: url('/assets/img/logos/sodavatn-logo.svg'); mask-image: url('/assets/img/logos/sodavatn-logo.svg'); width: 74px; height: 65px; }
.tlogo.blomstra { -webkit-mask-image: url('/assets/img/logos/blomstra-logo.svg'); mask-image: url('/assets/img/logos/blomstra-logo.svg'); width: 120px; height: 48px; }
.tlogo.kling { -webkit-mask-image: url('/assets/img/logos/kling-logo.svg'); mask-image: url('/assets/img/logos/kling-logo.svg'); width: 106px; height: 45px; }
.tlogo.frami { -webkit-mask-image: url('/assets/img/logos/frami-logo.svg'); mask-image: url('/assets/img/logos/frami-logo.svg'); width: 150px; height: 36px; }
.tlogo.elvo { -webkit-mask-image: url('/assets/img/logos/elvo-logo.svg'); mask-image: url('/assets/img/logos/elvo-logo.svg'); width: 128px; height: 44px; }

/* photo bands */
.photo-band { margin: 0; }
.photo-band img { width: 100%; height: clamp(260px, 40vw, 480px); object-fit: cover; display: block; }
.photo-band figcaption { font-size: 13px; color: #8f9a92; padding: 10px 24px; max-width: var(--max); margin: 0 auto; }

/* octagon photo medallion */
.oct-photo {
  width: min(100%, 300px); aspect-ratio: 1; object-fit: cover; justify-self: center;
  clip-path: polygon(50% 4%, 82% 17%, 96% 50%, 82% 83%, 50% 96%, 18% 83%, 4% 50%, 18% 17%);
}
@media (max-width: 700px) { .manifesto .wrap { grid-template-columns: 1fr !important; } .oct-photo { width: 220px; } }

/* interactive plan */
.plan-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.plan-tab {
  font-family: var(--sans); font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 11px 18px; border: 2px solid var(--ink); border-radius: 3px;
  background: transparent; color: var(--ink); cursor: pointer;
}
.plan-tab.active { background: var(--ink); color: var(--bone); }
.plan-stage { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .plan-stage { grid-template-columns: 1fr; } }
.plan-floors { border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); box-shadow: 6px 6px 0 rgba(19,31,23,0.12); padding: 12px; }
.plan-svg { width: 100%; height: auto; color: var(--moss); }
.plan-room { cursor: pointer; transition: fill 0.15s; stroke: var(--ink); stroke-width: 1.5; outline: none; }
.plan-room.laust { fill: rgba(201,226,101,0.35); }
.plan-room.laust:hover, .plan-room.laust:focus, .plan-room.laust.sel { fill: var(--lime); }
.plan-room.fratekid { fill: rgba(19,31,23,0.08); }
.plan-room.fratekid:hover, .plan-room.fratekid.sel { fill: rgba(19,31,23,0.16); }
.plan-room.sameign { fill: rgba(185,138,46,0.13); }
.plan-room.sameign:hover, .plan-room.sameign.sel { fill: rgba(185,138,46,0.3); }
.plan-label { font-family: var(--sans); font-size: 12.5px; fill: var(--ink); text-anchor: middle; pointer-events: none; }
.plan-ctx { fill: none; stroke: rgba(19,31,23,0.18); stroke-width: 1; stroke-dasharray: 4 4; pointer-events: none; }
.plan-panel { border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); padding: 24px; min-height: 220px; }
.plan-panel h3 { font-size: 21px; margin: 10px 0 8px; }
.plan-panel p { font-size: 14.5px; color: #4a564e; }
.plan-hint { font-size: 14.5px; color: #8f9a92; }
.plan-price { font-family: var(--serif); font-size: 19px; color: var(--ink); margin-top: 10px; }
.plan-status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 3px; border: 1.5px solid var(--ink); }
.plan-status.laust { background: var(--lime); }
.plan-status.fratekid { background: rgba(19,31,23,0.08); }
.plan-status.sameign { background: rgba(185,138,46,0.2); }
.plan-cta {
  display: inline-block; margin-top: 16px; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 12px 18px; background: var(--ink); color: var(--bone);
  text-decoration: none; border-radius: 3px;
}
.plan-cta:hover { background: var(--pine); }
.plan-fine { margin-top: 14px; font-size: 12.5px; color: #8f9a92; }

/* iso 3D view */
.plan-iso .iso-top.laust { fill: rgba(201,226,101,0.55); }
.plan-iso .iso-top.laust:hover, .plan-iso .iso-top.laust.sel { fill: var(--lime); }
.plan-iso .iso-top.fratekid { fill: rgba(19,31,23,0.1); }
.plan-iso .iso-top.sameign { fill: rgba(185,138,46,0.18); }
.plan-iso .iso-top { stroke: var(--ink); stroke-width: 1.2; cursor: pointer; }
.iso-side { stroke: var(--ink); stroke-width: 1; pointer-events: none; }
.iso-side.laust { fill: rgba(160,185,80,0.5); }
.iso-side.fratekid { fill: rgba(19,31,23,0.22); }
.iso-side.sameign { fill: rgba(150,110,40,0.3); }
.iso-desk { fill: rgba(19,31,23,0.25); pointer-events: none; }
.iso-roof { fill: rgba(245,241,230,0.75); stroke: var(--ink); stroke-width: 1.2; pointer-events: none; }
.iso-roofline { stroke: var(--ink); stroke-width: 0.8; opacity: 0.5; pointer-events: none; }
.iso-support { stroke: var(--ink); stroke-width: 1; opacity: 0.35; pointer-events: none; }

/* 3D líflegheit */
.iso-block { animation: iso-rise 0.5s ease both; transition: transform 0.18s ease; }
.iso-block:has(.plan-room:hover), .iso-block:has(.plan-room.sel) { transform: translateY(-5px); }
@keyframes iso-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .iso-block { animation: none; transition: none; } }
.iso-roofmain { fill: rgba(19,31,23,0.05); stroke: var(--ink); stroke-width: 1; opacity: 0.85; pointer-events: none; }
.iso-roofmain.gable { fill: rgba(19,31,23,0.09); }
.iso-ridge { stroke: var(--ink); stroke-width: 1.4; opacity: 0.6; }
.iso-roofg, .iso-mezzg { pointer-events: auto; }
.iso-roofg { pointer-events: none; }
.iso-dimline { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.55; }
.plan-dim { font-family: var(--sans); font-size: 11px; fill: var(--ink); opacity: 0.75; }
.plan-toggles { display: flex; gap: 18px; margin: -8px 0 14px; }
.plan-toggles label { font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.plan-toggles input { accent-color: var(--moss); }

.iso-ghost { opacity: 0.22; pointer-events: none; }
.iso-ghost .plan-room { cursor: default; }
.iso-logo { opacity: 0.7; pointer-events: none; }

.plan-photo { width: 100%; border-radius: 4px; margin-bottom: 14px; display: block; object-fit: cover; aspect-ratio: 3/2; }
