/* Skyboat - Nordic Earth Tones CSS */
/* Ren HTML/CSS version för enkel redigering i Visual Studio Code */

/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Georgia&display=swap');

/* ============================================
   CSS VARIABLES - Nordic Earth Tones
   ============================================ */
:root {
  /* Foundation Colors (60% av ytan) */
  --background: #EFE6DD;           /* Varm linneton - mjukare beige (mindre vit) */
  --card: #F7F3EE;                 /* Ljusare kort-yta, skapar mer separation mot bakgrunden */
  --border: #E5DFD6;               /* Mjuk kant */
  
  /* Text Colors (30%) */
  --foreground: #1E1E1E;           /* Grafitgrå */
  --foreground-muted: #4A4A4A;     /* Mjukare grå */
  --foreground-light: #808080;     /* Dämpad grå */
  
  /* Accent Colors (10%) */
  --primary: #CBA135;              /* Ockra - CTAs */
  --primary-foreground: #FFFFFF;   /* Vit text på ockra */
  --secondary: #3D5F44;            /* Skogsgrön */
  --secondary-foreground: #F4F1EC; /* Ljus sand på grön */
  --accent: #A46C5B;               /* Terrakotta */
  
  /* Layout */
  --radius: 0.75rem;
  --max-width: 1200px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
}

/* Subtle linen texture overlay to give the site warmth without heavy patterning */
body {
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.015) 1px, transparent 1px), linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.01));
  background-size: 18px 18px, 100% 100%;
  background-repeat: repeat, no-repeat;
  background-attachment: fixed;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--foreground);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
}

p {
  font-family: Georgia, serif;
  color: var(--foreground-muted);
  line-height: 2.0;
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .md-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .lg-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--secondary);
  padding: 1rem 2rem;
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 56px;
  background: transparent;
  filter: none;
  display: block;
}

/* Optional background wrapper for logos that need a shaped or colored tile
   Use by wrapping the <img> with a span.logo-bg or applying the class to the
   image element itself. Default is transparent; change to var(--card) if you
   prefer a soft sand tile behind the mark. */
.logo-bg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 9999px; /* round */
  background-color: rgba(247,245,241,0.6); /* light, semi-transparent */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* When used, shrink the logo slightly to fit inside the round tile */
.logo-bg .logo {
  height: 48px;
}

.nav {
  display: none;
}

/* Mobile navigation styles */
@media (max-width: 767px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: var(--secondary);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }
  
  .nav.nav-open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .nav a {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(244, 241, 236, 0.1);
  }
  
  .nav a:last-child {
    border-bottom: none;
  }
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    gap: 2rem;
  }
}

.nav a {
  color: var(--secondary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav a:hover {
  opacity: 1;
  color: var(--secondary-foreground);
}

/* Mobile menu toggle */
.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  color: var(--secondary-foreground);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background-color: var(--secondary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 6rem;
  text-align: center;
}

/* Band-hero: a restrained, full-width band used on subpages.
   Uses a background image (optional) with a subtle dark overlay for text
   readability. Smaller than the main homepage hero. */
.band-hero {
  position: relative;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  min-height: 45vh;
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
  background-size: cover;
  background-position: center;
}

.band-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(61,95,68,0.7), rgba(61,95,68,0.65));
  pointer-events: none;
}

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

/* Make heading and paragraph colours stronger inside band-hero */
.band-hero h1,
.band-hero h2 {
  color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.band-hero p { 
  color: rgba(255,255,255,0.95); 
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Book card helpers */
.book-cover { 
  border-radius: 6px; 
  display: block;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-cover:hover {
  transform: translateY(-4px) rotate(2deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.book-cover.large { width: 12rem; }
.book-cover.small { width: 6.5rem; }
.book-feature { display: flex; gap: 1.25rem; align-items: flex-start; flex-direction: column; }
.book-feature .book-cover.large { width: 14rem; }
.book-small { display: flex; gap: 1rem; align-items: flex-start; }

@media (min-width: 768px) {
  .book-feature { flex-direction: row; }
}

/* Sales badge for featured books */
.sales-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary) 0%, #D4A84E 100%);
  color: var(--primary-foreground);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(203, 161, 53, 0.3);
  margin-bottom: 0.75rem;
  animation: subtle-pulse 3s ease-in-out infinite;
}
.sales-badge strong { 
  font-weight: 800;
  font-size: 1rem;
}

@keyframes subtle-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Use hero image as background fallback so the hero shows even if <img> fails */
.hero {
  background-image: url('images/Skyboatosterlen.png');
  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: 800px;
}

/* Remove stray empty elements that may appear over the hero image */
.hero *:empty {
  display: none !important;
}

/* Ensure direct hero content doesn't get an accidental background */
.hero .hero-content > * {
  background: transparent !important;
}

.hero-logo {
  height: 6rem;
  margin-bottom: 2rem;
  filter: brightness(0) invert(1);
}

@media (min-width: 768px) {
  .hero-logo { height: 8rem; }
}

.hero h1 {
  color: #FFFFFF;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    gap: 1.5rem;
  }
}

/* ============================================
   PAGE HEADER (undersidor)
   ============================================ */
.page-header {
  background-color: var(--secondary);
  padding: 8rem 2rem 4rem;
  text-align: center;
}

.page-header h1 {
  color: var(--secondary-foreground);
  margin-bottom: 1rem;
}

.page-header p {
  color: rgba(244, 241, 236, 0.8);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

.page-header-icon {
  width: 3rem;
  height: 3rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

/* Larger icon/text variant for page header (used for decorative symbol) */
.page-header-icon--large {
  display: block;
  font-size: 3rem;
}

/* ============================================
   SECTIONS
   ============================================ */
section {
  padding: 7rem 2rem;
}

.section-light {
  background-color: var(--background);
}

.section-card {
  background-color: var(--card);
}

.section-dark {
  background-color: var(--secondary);
}

.section-dark h2,
.section-dark h3,
.section-dark p {
  color: var(--secondary-foreground);
}

.section-dark p {
  opacity: 0.9;
}

@media (max-width: 768px) {
  section {
    padding: 5rem 1.5rem;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: #B8912F;
  color: var(--primary-foreground);
}

.btn-outline {
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--secondary-foreground);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--secondary-foreground);
}

/* Outline button on light backgrounds */
.section-light .btn-outline,
.section-card .btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.section-light .btn-outline:hover,
.section-card .btn-outline:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-ghost {
  background-color: transparent;
  color: var(--primary);
  box-shadow: none;
}

.btn-ghost:hover {
  background-color: rgba(203, 161, 53, 0.1);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 1.125rem 2.75rem;
  font-size: 1.125rem;
}

.btn-full {
  width: 100%;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: rgba(203, 161, 53, 0.2);
}

.card-clickable {
  cursor: pointer;
}

.card h3 {
  margin-bottom: 1rem;
  color: var(--foreground);
}

.card p {
  margin-bottom: 1rem;
}

.card-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.75rem;
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Title inside card header, aligns with icon */
.card-header-title {
  margin-left: 0.75rem;
  margin-bottom: 0;
}

/* ============================================
   IMAGES
   ============================================ */
.img-rounded {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.img-cover {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.img-rounded:hover .img-cover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .img-cover {
    height: 16rem;
  }
}

/* ============================================
   QUOTE BOX
   ============================================ */
.quote-box {
  background-color: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s ease;
}

.quote-box:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.quote-box p {
  font-style: italic;
  color: var(--foreground-muted);
  line-height: 1.9;
  margin-bottom: 0;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
  font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background-color: var(--background);
  color: var(--foreground);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(203, 161, 53, 0.1);
}

.form-textarea {
  min-height: 10rem;
  resize: vertical;
  line-height: 1.6;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--foreground-light);
  opacity: 0.6;
}

/* ============================================
   CONTACT INFO
   ============================================ */
.contact-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact-item:hover {
  background-color: rgba(203, 161, 53, 0.05);
  transform: translateX(4px);
}

.contact-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, var(--card) 0%, rgba(203, 161, 53, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background-color: var(--secondary);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-nav a {
  color: var(--secondary-foreground);
  opacity: 0.7;
  font-size: 0.875rem;
}

.footer-nav a:hover {
  opacity: 1;
  color: var(--secondary-foreground);
}

.footer-copyright {
  color: var(--secondary-foreground);
  opacity: 0.5;
  font-size: 0.875rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }

.mx-auto { margin-left: auto; margin-right: auto; }

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--foreground-muted); }

/* Small muted text variant for secondary paragraphs */
.text-muted-small {
  color: var(--foreground-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.bg-card { background-color: var(--card); }

/* ============================================
   RESPONSIVE SPACING
   ============================================ */
@media (max-width: 768px) {
  section {
    padding: 5rem 1.5rem;
  }
  
  .container {
    padding: 0 1rem;
  }
}

/* ============================================
   LINK WITH ARROW
   ============================================ */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 500;
  transition: gap 0.3s ease, color 0.3s ease;
}

.link-arrow:hover {
  color: var(--accent);
  gap: 0.75rem;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus,
.skip-link:active {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: var(--card);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  z-index: 200;
}

/* Visible focus outlines for keyboard users */
:focus {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* Lead paragraph style for slightly larger, readable text */
.lead { font-size: 1.125rem; }

/* Utility to remove link underline and inherit color */
.no-underline { text-decoration: none; color: inherit; }

/* Honeypot (hidden) field for spam prevention */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ============================================
   LIST STYLES
   ============================================ */
.list-features {
  list-style: none;
}

.list-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--foreground-muted);
  font-family: Georgia, serif;
}

.list-icon {
  width: 1rem;
  height: 1rem;
  color: var(--accent);
}
