/* =========================================================================
   Frida Hagvaag — "Nordlys-ro" (northern calm)
   Palette: 4 named values + neutrals. --nordlys is the ONLY accent.
   ========================================================================= */

:root {
  --hav: #16222b;        /* deep blue-black — primary text, footer bg */
  --drivved: #f5f2ec;    /* warm off-white paper — page background */
  --nordlys: #3fa98e;    /* restrained aurora green — links, buttons, focus */
  --skifer: #5c6b72;     /* slate — secondary text, borders */

  --hav-08: rgba(22, 34, 43, 0.08);
  --hav-14: rgba(22, 34, 43, 0.14);
  --nordlys-glow: rgba(63, 169, 142, 0.55);

  --measure: 68ch;       /* narrow content column */
  --page-pad: clamp(1.25rem, 5vw, 3rem);

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

/* ------------------------------- Reset-ish ------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--drivved);
  color: var(--hav);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

a {
  color: inherit;
}

/* ------------------------------- Layout --------------------------------- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.wrap.narrow {
  max-width: calc(var(--measure) + var(--page-pad) * 2);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

/* ------------------------- Accessibility helpers ------------------------ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--hav);
  color: var(--drivved);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 6px 0;
}

.skip-link:focus {
  left: 0;
}

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

/* --------------------------------- Header ------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--drivved) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--hav-08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: block;
  height: 40px;
  width: auto;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1875rem;
  letter-spacing: 0.01em;
  color: var(--hav);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 1.5rem);
}

.header-cta {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--hav);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--nordlys);
  transition: color 0.2s ease;
}

.header-cta:hover {
  color: var(--nordlys);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

.lang-toggle button {
  appearance: none;
  background: none;
  border: none;
  padding: 0.2rem 0.15rem;
  margin: 0;
  cursor: pointer;
  color: var(--skifer);
  font: inherit;
  letter-spacing: inherit;
}

.lang-toggle button[aria-pressed="true"] {
  color: var(--hav);
  font-weight: 600;
}

.lang-sep {
  color: var(--hav-14);
}

/* --------------------------------- Hero --------------------------------- */

.hero {
  position: relative;
  min-height: clamp(30rem, 78vh, 44rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;   /* headline sits low; sky is empty above */
  overflow: hidden;
  padding-bottom: clamp(3rem, 9vh, 6rem);
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 20ch;             /* asymmetric: headline left, short measure */
}

.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
  max-width: 16ch;
}

.hero-subline {
  margin-top: 1.5rem;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--skifer);
}

.hero .btn {
  margin-top: 2.25rem;
}

/* Desktop: let the hero headline + subline span ~two-thirds of the page,
   set left, instead of being squeezed into the phone-width column.
   Mobile base above is intentionally left untouched (its caps are wider
   than a phone viewport, so they never bite there). */
@media (min-width: 768px) {
  .hero-copy {
    max-width: 46rem;
  }
  .hero h1 {
    max-width: none;
    font-size: clamp(2.6rem, 4.6vw, 4rem);
  }
  .hero-subline {
    max-width: 42ch;
  }
}

/* ------------------------ Signature: the horizon ------------------------ */

.horizon {
  position: relative;
  width: 100%;
}

.horizon-line {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--hav);
  opacity: 0.5;
}

/* The aurora glow sits ABOVE the line and drifts almost imperceptibly */
.horizon-glow {
  position: absolute;
  left: -25%;
  bottom: 0;
  width: 150%;
  height: 130px;
  pointer-events: none;
  background: radial-gradient(
    120% 100% at 30% 100%,
    var(--nordlys-glow) 0%,
    rgba(63, 169, 142, 0.14) 34%,
    transparent 68%
  );
  filter: blur(6px);
  opacity: 0.9;
  animation: aurora-drift 22s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  0% {
    transform: translateX(-6%) scaleY(0.92);
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(6%) scaleY(1.06);
    opacity: 0.82;
  }
}

/* Hero horizon: anchored low, full-bleed */
.horizon--hero {
  position: absolute;
  left: 0;
  bottom: clamp(1.5rem, 6vh, 3.5rem);
  z-index: 1;
}

.horizon--hero .horizon-line {
  opacity: 0.55;
}

/* Section divider: the same line, recurring, quiet */
.horizon--divider {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.horizon--divider .horizon-line {
  opacity: 0.28;
}

/* ------------------------------- Eyebrow -------------------------------- */

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nordlys);
  margin: 0 0 1.75rem;
  font-weight: 600;
}

/* -------------------------------- Buttons ------------------------------- */

.btn {
  display: inline-block;
  background: var(--nordlys);
  color: #08140f;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn:hover {
  background: color-mix(in srgb, var(--nordlys) 88%, #08140f);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* -------------------------------- Problem ------------------------------- */

.problem-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.problem-list li {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.32;
  color: var(--hav);
  max-width: 30ch;
}

.problem-list li:nth-child(2) {
  margin-inline-start: auto;
  text-align: right;
}

/* -------------------------------- Services ------------------------------ */

.services h2,
.showcase h2 {
  font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.6rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* Borderless cards — separated by space, not boxes */
.cards {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3rem);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.card p {
  margin: 0;
  color: var(--skifer);
  max-width: 62ch;
}

/* -------------------------------- Showcase ------------------------------ */

.showcase-items {
  display: grid;
  gap: clamp(2.5rem, 6vw, 3.5rem);
}

.showcase-item {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.thumb {
  aspect-ratio: 16 / 10;
  background: color-mix(in srgb, var(--hav) 6%, var(--drivved));
  border: 1px solid var(--hav-08);
  border-radius: 4px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.thumb-note,
.portrait-note {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--skifer);
  opacity: 0.7;
}

/* "This website" thumb shows the signature motif itself */
.thumb--site {
  background: var(--hav);
  position: relative;
}

.thumb--site .horizon--mini {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 42%;
}

.thumb--site .horizon-line {
  background: var(--drivved);
  opacity: 0.4;
}

.showcase-text h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.showcase-text p {
  margin: 0;
  color: var(--skifer);
}

@media (min-width: 720px) {
  .showcase-item {
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: 2.5rem;
  }
}

/* --------------------------------- About -------------------------------- */

.about-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.portrait {
  aspect-ratio: 4 / 5;
  max-width: 260px;
  background: color-mix(in srgb, var(--hav) 6%, var(--drivved));
  border: 1px solid var(--hav-08);
  border-radius: 4px;
  display: grid;
  place-items: center;
}

.about-text h2 {
  font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.6rem);
  margin-bottom: 1rem;
}

.about-text p {
  margin: 0;
  color: var(--skifer);
}

@media (min-width: 720px) {
  .about-inner {
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    align-items: start;
  }
}

/* ---------------------------- Iceland banner ---------------------------- */

.iceland {
  background: var(--hav);
  color: var(--drivved);
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
}

.iceland-inner {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 4vw, 2rem);
  flex-wrap: wrap;
}

.iceland-mark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--nordlys);
  white-space: nowrap;
}

.iceland-text {
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.15rem);
  color: color-mix(in srgb, var(--drivved) 88%, transparent);
  max-width: 58ch;
}

/* --------------------------------- Contact ------------------------------ */

.contact h2 {
  font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.contact-intro {
  margin: 0 0 2.5rem;
  color: var(--skifer);
  max-width: 54ch;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
  max-width: 34rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.field input,
.field textarea {
  font: inherit;
  color: var(--hav);
  background: color-mix(in srgb, var(--hav) 3%, #fff);
  border: 1px solid var(--hav-14);
  border-radius: 3px;
  padding: 0.7rem 0.85rem;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--nordlys);
  box-shadow: 0 0 0 3px var(--nordlys-glow);
}

.contact-form .btn {
  justify-self: start;
  margin-top: 0.25rem;
}

.form-status {
  margin: 0;
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
  border-radius: 3px;
  background: color-mix(in srgb, var(--nordlys) 14%, var(--drivved));
  border: 1px solid color-mix(in srgb, var(--nordlys) 40%, transparent);
}

.form-status.is-error {
  background: color-mix(in srgb, #b4442f 12%, var(--drivved));
  border-color: color-mix(in srgb, #b4442f 40%, transparent);
}

.form-fallback {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--skifer);
}

.mailto-link {
  color: var(--hav);
  text-decoration: underline;
  text-decoration-color: var(--nordlys);
  text-underline-offset: 3px;
}

.mailto-link:hover {
  color: var(--nordlys);
}

.location {
  margin: 2.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--skifer);
}

/* --------------------------------- Footer ------------------------------- */

.site-footer {
  background: var(--hav);
  color: color-mix(in srgb, var(--drivved) 80%, transparent);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.footer-inner {
  display: grid;
  gap: 0.4rem;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--drivved);
  margin: 0 0 0.5rem;
}

.footer-meta {
  margin: 0;
  font-size: 0.9375rem;
}

.footer .mailto-link,
.site-footer .mailto-link {
  color: var(--drivved);
}

.placeholder-text {
  opacity: 0.6;
  font-style: italic;
}

/* ------------------------------ Motion pref ----------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .horizon-glow {
    animation: none;
  }
  .btn:hover {
    transform: none;
  }
}

/* ------------------------------ Small screens --------------------------- */

@media (max-width: 420px) {
  .header-cta {
    display: none;   /* keep header uncluttered at 360px; hero CTA remains */
  }
  .problem-list li:nth-child(2) {
    margin-inline-start: 0;
    text-align: left;
  }
}

/* ========================================================================
   Additions: logo, showcase images, portrait photo, footer legal links,
   and the Terms/Privacy legal pages.
   ======================================================================== */

/* --- Header logo lockup: keep the wordmark from crowding at 360px --- */
@media (max-width: 380px) {
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-mark {
    height: 36px;
  }
}

/* --- Showcase image thumbnails --- */
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

a.thumb {
  position: relative;
  text-decoration: none;
  transition: filter 0.2s ease;
}

a.thumb:hover {
  filter: brightness(1.04);
}

.thumb--shot {
  border-color: var(--hav-14);
}

.is-comingsoon img {
  filter: saturate(0.88);
}

.badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--hav);
  color: var(--drivved);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
}

.showcase-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.9375rem;
  color: var(--hav);
  text-decoration: none;
  border-bottom: 1px solid var(--nordlys);
  padding-bottom: 1px;
  transition: color 0.2s ease;
}

.showcase-link:hover {
  color: var(--nordlys);
}

/* --- Portrait photo (replaces placeholder box) --- */
.portrait {
  display: block;
  margin: 0;
  overflow: hidden;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Footer legal links --- */
.footer-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.15rem 0;
  font-size: 0.9375rem;
}

.footer-link {
  color: color-mix(in srgb, var(--drivved) 78%, transparent);
  text-decoration: none;
}

.footer-link:hover,
.footer-link[aria-current="true"] {
  color: var(--drivved);
  text-decoration: underline;
  text-decoration-color: var(--nordlys);
  text-underline-offset: 3px;
}

.footer-sep {
  color: color-mix(in srgb, var(--drivved) 38%, transparent);
}

/* --- Language toggle as links (legal pages) --- */
.lang-toggle a {
  text-decoration: none;
  color: var(--skifer);
  padding: 0.2rem 0.15rem;
}

.lang-toggle a[aria-current="true"] {
  color: var(--hav);
  font-weight: 600;
}

/* --- Legal pages (Terms / Privacy) --- */
.legal {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.legal h1 {
  font-size: clamp(2rem, 1.6rem + 1.5vw, 3rem);
  margin-bottom: 0.4rem;
}

.legal-updated {
  color: var(--skifer);
  font-size: 0.875rem;
  margin: 0 0 2.5rem;
}

.legal h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.35rem;
  margin: 2.2rem 0 0.5rem;
}

.legal p,
.legal li {
  color: var(--hav);
}

.legal p {
  margin: 0 0 1rem;
  max-width: 68ch;
}

.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  max-width: 68ch;
}

.legal li {
  margin-bottom: 0.5rem;
}

.legal a:not(.mailto-link):not(.back-link) {
  color: var(--hav);
  text-decoration: underline;
  text-decoration-color: var(--nordlys);
  text-underline-offset: 3px;
}

.back-link {
  display: inline-block;
  margin-top: 2.5rem;
  color: var(--hav);
  text-decoration: none;
  border-bottom: 1px solid var(--nordlys);
  padding-bottom: 1px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--nordlys);
}