/* ============================================================
   UTILOFT.IS — Tálknafjörður Camping Grounds
   style.css — Complete design system
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Jost:wght@200;300;400;500&display=swap');

/* ── CSS Variables ── */
:root {
  /* Colours */
  --navy:        #0f1923;
  --navy-mid:    #162230;
  --navy-light:  #1e2f3e;
  --fog:         #c8d4da;
  --fog-light:   #dde6ea;
  --fog-pale:    #edf2f4;
  --white:       #f5f7f8;
  --offwhite:    #e8edf0;
  --teal:        #4ab5c4;
  --teal-dim:    #2e8a96;
  --amber:       #c8955a;
  --text-dim:    rgba(245,247,248,0.55);
  --text-mid:    rgba(245,247,248,0.75);
  --border-dark: rgba(255,255,255,0.07);
  --border-fog:  rgba(200,212,218,0.25);

  /* Typography */
  --serif:  'Cormorant Garamond', Georgia, serif;
  --sans:   'Jost', sans-serif;

  /* Sizing */
  --nav-h:    64px;
  --sidebar-w: 340px;
  --radius:   4px;
  --radius-lg: 10px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--fog);
  color: var(--navy);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--sans); }

/* ── Language hidden ── */
[lang="is"] { display: none; }
body.is [lang="en"] { display: none; }
body.is [lang="is"] { display: revert; }

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--fog-pale);
  border-bottom: 1px solid var(--border-fog);
  display: flex;
  align-items: center;
  padding: 0 32px;
  z-index: 1000;
  gap: 0;
}

.nav-brand {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-divider {
  width: 1px;
  height: 28px;
  background: var(--border-fog);
  margin: 0 28px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  flex: 1;
}

.nav-links li a {
  display: block;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.65;
  transition: opacity 0.2s var(--ease);
  border-right: 1px solid var(--border-fog);
  line-height: var(--nav-h);
  white-space: nowrap;
}

.nav-links li:first-child a { border-left: 1px solid var(--border-fog); }

.nav-links li a:hover,
.nav-links li a.active { opacity: 1; }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-fog);
  border-radius: var(--radius);
  overflow: hidden;
}

.lang-btn {
  padding: 5px 12px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.5;
  transition: all 0.2s var(--ease);
  background: transparent;
}

.lang-btn.active {
  background: var(--navy);
  color: var(--white);
  opacity: 1;
}

.lang-btn:hover:not(.active) { opacity: 0.9; background: var(--fog); }

/* Mobile nav toggle */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--navy);
  transition: all 0.3s var(--ease);
}

/* ============================================================
   PAGE WRAPPER
   ============================================================ */

.page-wrap {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ============================================================
   HERO — HOME (split layout)
   ============================================================ */

.hero-home {
  display: block;
  height: calc(100vh - var(--nav-h));
  min-height: 600px;
}

.hero-image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--navy-mid);
  height: 100%;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}

.hero-image-wrap img.loaded { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15,25,35,0.55) 0%,
    rgba(15,25,35,0.1) 50%,
    transparent 100%
  );
}

.hero-content {
  position: absolute;
  top: 48px;
  left: 40px;
  max-width: 440px;
}

.hero-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fog);
  opacity: 0.8;
  margin-bottom: 14px;
}

.hero-headline {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 300;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 20px;
}

.hero-headline em {
  font-style: italic;
  font-weight: 300;
  color: var(--fog-light);
}

.hero-body {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-mid);
  margin-bottom: 32px;
  max-width: 320px;
}

.btn-outline {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid rgba(245,247,248,0.5);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  transition: all 0.25s var(--ease);
}

.btn-outline:hover {
  background: rgba(245,247,248,0.12);
  border-color: var(--white);
}

.btn-solid {
  display: inline-block;
  padding: 12px 28px;
  background: var(--teal);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  border-radius: var(--radius);
  transition: all 0.25s var(--ease);
}

.btn-solid:hover { background: var(--teal-dim); }

/* ============================================================
   WIDGET SIDEBAR
   ============================================================ */

.widget-sidebar {
  background: var(--navy);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.widget-block {
  padding: 28px 28px 24px;
  border-right: 1px solid var(--border-dark);
  animation: fadeUp 0.5s var(--ease) both;
}

.widget-block:last-child { border-right: none; }
.widget-block:nth-child(1) { animation-delay: 0.1s; }
.widget-block:nth-child(2) { animation-delay: 0.2s; }
.widget-block:nth-child(3) { animation-delay: 0.3s; }
.widget-block:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.widget-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.widget-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--teal);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.widget-dot.amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.widget-dot.dim   { background: rgba(255,255,255,0.3); box-shadow: none; animation: none; }

.widget-big {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.widget-big sup {
  font-size: 20px;
  font-weight: 300;
  vertical-align: super;
  line-height: 0;
}

.widget-condition {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-mid);
  margin-bottom: 16px;
  font-family: var(--sans);
}

.widget-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}


.widget-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  font-weight: 300;
  color: var(--text-dim);
  font-family: var(--sans);
}

.widget-row span:last-child {
  color: var(--text-mid);
  font-weight: 400;
}

.widget-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border: 1px solid var(--teal-dim);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  border-radius: 2px;
}

.widget-badge.amber-badge {
  border-color: var(--amber);
  color: var(--amber);
}

/* Tide chart */
.tide-chart {
  margin: 14px 0 10px;
  height: 52px;
  position: relative;
}

.tide-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Moon */
.moon-display {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

.moon-svg-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
}

.moon-info { flex: 1; }

.moon-phase-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 4px;
}

.moon-illumination {
  font-size: 11px;
  color: var(--text-dim);
}

/* Loading skeleton */
.skel {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
  border-radius: 3px;
  height: 14px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   SUBPAGE HERO
   ============================================================ */

.hero-sub {
  position: relative;
  height: 52vh;
  min-height: 320px;
  overflow: hidden;
  background: var(--navy-mid);
}

.hero-sub img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
}

.hero-sub img.loaded { opacity: 1; }

.hero-sub-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15,25,35,0.2) 0%, rgba(15,25,35,0.65) 100%);
}

.hero-sub-content {
  position: absolute;
  bottom: 40px;
  left: 48px;
  right: 48px;
}

.hero-sub-eyebrow {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fog);
  opacity: 0.7;
  margin-bottom: 10px;
}

.hero-sub-title {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.05;
}

.hero-sub-title em { font-style: italic; }

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */

.section {
  padding: 80px 48px;
}

.section-narrow {
  max-width: 860px;
  margin: 0 auto;
}

.section-wide {
  max-width: 1280px;
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-dim);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 300;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 24px;
}

.section-title em { font-style: italic; }

.section-lead {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  color: #3a4a56;
  max-width: 680px;
  margin-bottom: 48px;
}

/* ── Dark section ── */
.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-dark .section-title { color: var(--white); }
.section-dark .section-lead  { color: var(--text-mid); }
.section-dark .section-eyebrow { color: var(--teal); }

/* ── Fog section ── */
.section-fog {
  background: var(--fog-pale);
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ── Card ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15,25,35,0.12);
}

.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--fog);
}

.card-body { padding: 22px 24px 26px; }

.card-eyebrow {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-dim);
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 10px;
}

.card-text {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
  color: #4a5a68;
}

/* ── Dark card ── */
.card-dark {
  background: var(--navy-light);
}

.card-dark .card-title { color: var(--white); }
.card-dark .card-text  { color: var(--text-mid); }
.card-dark .card-eyebrow { color: var(--teal); }

/* ── Feature row ── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }

.feature-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* ============================================================
   FACILITIES ICONS
   ============================================================ */

.facility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.facility-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  gap: 12px;
  transition: transform 0.25s var(--ease);
}

.facility-item:hover { transform: translateY(-3px); }

.facility-icon {
  width: 40px;
  height: 40px;
  color: var(--teal-dim);
}

.facility-name {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--navy);
}

/* ============================================================
   INSTAGRAM FEED
   ============================================================ */

.instagram-section {
  padding: 64px 48px;
  background: var(--fog-pale);
}

.instagram-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
}

.instagram-handle {
  font-size: 13px;
  color: var(--teal-dim);
  font-weight: 400;
}

.behold-widget-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ============================================================
   SUBSTACK / NEWSLETTER
   ============================================================ */

.substack-section {
  padding: 80px 48px;
  background: var(--navy);
  text-align: center;
}

.substack-section .section-title { color: var(--white); }

.substack-placeholder {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  color: var(--text-mid);
  font-size: 13px;
  line-height: 1.7;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--navy);
  padding: 56px 48px 36px;
  border-top: 1px solid var(--border-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 14px;
}

.footer-tagline {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 20px;
}

.footer-address {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-dim);
}

.footer-col-title {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-mid);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 300;
}

.footer-coords {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
}

/* ============================================================
   DIVIDERS & UTILS
   ============================================================ */

.divider {
  width: 40px;
  height: 1px;
  background: var(--teal);
  margin: 24px 0;
}

.divider-full {
  width: 100%;
  height: 1px;
  background: var(--border-fog);
  margin: 48px 0;
}

.text-teal   { color: var(--teal); }
.text-amber  { color: var(--amber); }
.text-dim    { color: var(--text-dim); }
.text-serif  { font-family: var(--serif); }
.text-italic { font-style: italic; }
.mt-auto     { margin-top: auto; }

/* ── Page load animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  :root { --sidebar-w: 300px; }
}

.nav-links.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--fog-pale);
  border-bottom: 1px solid var(--border-fog);
  padding: 16px 0;
  z-index: 999;
}

.nav-links.open li a {
  border: none;
  border-bottom: 1px solid var(--border-fog);
  line-height: 1;
  padding: 14px 24px;
}

@media (max-width: 900px) {
  .hero-home {
    grid-template-columns: 1fr;
    grid-template-rows: 56vh auto;
    height: auto;
  }

  .widget-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .widget-block { border-right: 1px solid var(--border-dark); }
  .widget-block:nth-child(even) { border-right: none; }

  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 32px; }
  .feature-row.reverse { direction: ltr; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-divider { display: none; }
}

@media (max-width: 640px) {
  :root { --nav-h: 56px; }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-divider { display: none; }

  .widget-sidebar { grid-template-columns: 1fr; }

  .hero-content { left: 24px; top: 24px; }
  .hero-headline { font-size: 40px; }

  .section { padding: 56px 24px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .instagram-section { padding: 48px 24px; }
  .hero-sub-content { left: 24px; right: 24px; }

  .nav-brand { font-size: 10px; letter-spacing: 0.07em; }
  .nav-right { display: flex; margin-left: auto; }
  .site-nav { padding: 0 16px; }
}


/* lang-hidden / lang-visible classes removed — widget lang switching
   now uses inline style.display set by reapplyLang() in main.js,
   while static page content is handled by the CSS attribute selectors
   ([lang="is"] and body.is [lang="en"]) defined at the top of this file. */