/* Sonja Koranter — warm light theme (high contrast, easy on the eyes) */
:root {
  --bg: #faf6ef;
  --bg-elev: #ffffff;
  --bg-soft: #f3ebe0;
  --text: #1c1814;
  --muted: #453c32;
  --link: #1a5f6b;
  --link-hover: #0d424b;
  --accent: #8b3a2f;
  --accent-hover: #6b2d24;
  --accent-soft: #f5e8dc;
  --border: #c9b8a4;
  --border-strong: #a89278;
  --shadow: rgba(44, 36, 28, 0.12);
  --radius: 14px;
  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --tap-min: 48px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 19px;
}

@media (min-width: 900px) {
  html {
    font-size: 20px;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image: linear-gradient(180deg, #fffefb 0%, var(--bg) 35%, #f5efe6 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a {
  color: var(--link);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  font-weight: 600;
}

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

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  image-rendering: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.85rem 1.15rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fffefb;
  border-bottom: 3px solid var(--border-strong);
  box-shadow: 0 2px 12px var(--shadow);
  padding-top: env(safe-area-inset-top);
}

.site-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 4.5vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  flex: 1 1 auto;
  min-width: 0;
}

.brand span {
  color: var(--accent);
}

/* Mobile menu button */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0.5rem 0.85rem;
  border: 3px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-elev);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 22px;
}

.nav-toggle-bars span {
  display: block;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  flex: 1 1 100%;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0.4rem 0.5rem;
  text-decoration: none;
  font-size: 1.08rem;
  color: var(--muted);
  font-weight: 700;
  border-radius: 8px;
}

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

nav a[aria-current="page"] {
  color: #fff;
  background: var(--accent);
  padding: 0.4rem 0.85rem;
}

.hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.25rem) 1.35rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.75rem 1rem 2.25rem;
  }

  .hero-portrait-wrap {
    order: -1;
    justify-self: center;
    width: min(100%, 300px);
  }

  .hero-actions {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero .lede {
    max-width: none;
    margin-inline: auto;
    font-size: 1.1rem;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 7.5vw, 2.65rem);
  }
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.5rem, 5.5vw, 3.5rem);
  line-height: 1.15;
  margin: 0 0 1.1rem;
  color: var(--text);
}

.hero .lede {
  color: var(--muted);
  font-size: 1.22rem;
  max-width: 38ch;
  margin: 0 0 1.65rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap-min);
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.08rem;
  text-decoration: none;
  border: 3px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-hover);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: var(--bg-elev);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.hero-portrait-wrap {
  position: relative;
  width: min(100%, 380px);
  justify-self: end;
}

.hero-portrait {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 3px solid var(--border-strong);
  box-shadow: 0 12px 32px var(--shadow);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  background: var(--bg-soft);
}

/* Writory — card under portrait */
.hero-writory-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  border: 3px solid #1a3d45;
  background: linear-gradient(145deg, #f0f9fa 0%, #ffffff 55%);
  box-shadow: 0 8px 24px rgba(26, 61, 69, 0.12);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-writory-card:hover {
  border-color: var(--link);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(26, 95, 107, 0.18);
  color: var(--text);
}

.hero-writory-logo {
  display: block;
  width: auto;
  height: 2rem;
  max-width: 140px;
  margin-bottom: 0.25rem;
}

.hero-writory-badge {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--link);
}

.hero-writory-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.hero-writory-desc {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 500;
}

.hero-writory-cta {
  margin-top: 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-writory {
  background: linear-gradient(135deg, #1a5f6b 0%, #0d424b 100%);
  color: #fff !important;
  border-color: #0d424b;
  text-decoration: none !important;
}

.btn-writory:hover {
  filter: brightness(1.08);
  color: #fff !important;
}

.btn-writory-lg {
  font-size: 1.12rem;
  padding: 0.9rem 1.65rem;
  margin-top: 0.5rem;
}

/* Writory promo band */
.writory-promo {
  max-width: 1140px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}

.writory-promo-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 1.65rem;
  border-radius: var(--radius);
  border: 3px solid #1a5f6b;
  background: linear-gradient(120deg, #eef8f9 0%, #fffefb 50%, #f5e8dc 100%);
  box-shadow: 0 8px 28px var(--shadow);
}

.writory-promo-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0.5rem 0 0.75rem;
  line-height: 1.2;
}

.writory-promo-text p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
  line-height: 1.65;
}

.writory-promo-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 1rem;
  min-width: 10rem;
}

.writory-promo-logo {
  display: block;
  width: auto;
  height: clamp(2.5rem, 6vw, 3.25rem);
  max-width: 180px;
  margin-bottom: 0.65rem;
}

.writory-promo-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.writory-promo-lines li {
  display: block;
  width: 100%;
  max-width: 11rem;
  margin: 0;
  padding: 0.55rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--link);
  text-align: center;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(26, 95, 107, 0.2);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(26, 95, 107, 0.08);
}

.section {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.25rem 1.35rem 3.25rem;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.2vw, 2.45rem);
  font-weight: 700;
  margin: 0 0 1.65rem;
  color: var(--text);
  border-bottom: 3px solid var(--border-strong);
  padding-bottom: 0.75rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.35rem;
}

.card-grid--dense {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.15rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 16px var(--shadow);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(139, 58, 47, 0.15);
}

.card-body {
  padding: 1.15rem 1.2rem 1.3rem;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.card-desc {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 500;
}

.card-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  min-height: 200px;
  border-bottom: 2px solid var(--border);
}

.card-thumb img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  object-position: center;
}

.card-grid--dense .card-thumb {
  min-height: 160px;
}

.card-grid--dense .card-thumb img {
  max-height: 200px;
}

.hero-news {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.35rem 2.75rem;
}

.news-pill {
  display: inline-block;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  color: var(--accent-hover);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.news-box {
  background: var(--bg-elev);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.65rem;
  box-shadow: 0 4px 14px var(--shadow);
}

.news-box p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 500;
}

.page-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(2.25rem, 4vw, 3.25rem) 1.35rem 3.75rem;
}

.page-main h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 2.85rem);
  font-weight: 700;
  margin: 0 0 0.85rem;
  color: var(--text);
}

.page-intro {
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 500;
  max-width: 62ch;
  margin: 0 0 2.25rem;
}

.back-row {
  margin-bottom: 1.35rem;
}

.back-row a {
  font-size: 1.08rem;
  font-weight: 700;
  text-decoration: underline;
}

.media-badge {
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid var(--border);
}

.seo-highlight {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.35rem 2rem;
}

.seo-highlight .news-box {
  border-color: var(--accent);
  background: #fffefb;
}

.seo-highlight strong {
  color: var(--text);
}

.site-footer {
  border-top: 3px solid var(--border-strong);
  margin-top: 2rem;
  padding: 2.25rem 1.35rem;
  background: var(--bg-soft);
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 500;
}

.footer-inner strong,
.footer-inner a {
  font-size: 1.08rem;
}

.footer-inner strong {
  color: var(--text);
}

/* Section links below cards */
.section p a {
  font-size: 1.1rem;
}

/* ─── Desktop nav ─── */
@media (min-width: 881px) {
  .site-nav {
    flex: 0 1 auto;
    width: auto;
  }

  .site-header-inner {
    flex-wrap: nowrap;
    padding: 1rem 1.35rem;
  }
}

/* ─── Mobile & tablet ─── */
@media (max-width: 880px) {
  html {
    font-size: 18px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .site-nav {
    display: none;
    width: 100%;
    padding-top: 0.35rem;
  }

  .site-nav.is-open {
    display: block;
  }

  nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  nav li {
    width: 100%;
  }

  nav a {
    width: 100%;
    justify-content: flex-start;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elev);
  }

  nav a[aria-current="page"] {
    padding: 0.85rem 1rem;
  }

  .card-grid,
  .card-grid--dense {
    grid-template-columns: 1fr;
  }

  .section,
  .page-main,
  .hero-news,
  .seo-highlight {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section {
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
  }

  .page-main {
    padding-bottom: 2.75rem;
  }

  .page-intro {
    max-width: none;
    font-size: 1.08rem;
  }

  .page-main h1 {
    font-size: clamp(1.75rem, 7vw, 2.35rem);
  }

  .section h2 {
    font-size: clamp(1.65rem, 6vw, 2rem);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .site-footer {
    padding: 1.75rem 1rem;
    padding-bottom: calc(1.75rem + env(safe-area-inset-bottom));
  }

  .news-box {
    padding: 1.1rem 1.15rem;
  }

  .card-title {
    font-size: 1.32rem;
    word-break: break-word;
  }

  .card-body {
    padding: 1rem;
  }

  .back-row a {
    display: inline-flex;
    min-height: var(--tap-min);
    align-items: center;
  }

  .hero-writory-card {
    width: 100%;
  }

  .writory-promo-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.25rem 1.15rem;
  }

  .writory-promo-aside {
    order: -1;
    padding-bottom: 0.25rem;
  }

  .writory-promo-lines li {
    max-width: 16rem;
    font-size: 0.95rem;
    padding: 0.6rem 1.15rem;
  }

  .writory-promo-text p {
    max-width: none;
    margin-inline: auto;
  }

  .writory-promo-text .btn-writory-lg {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }

  .hero-actions .btn-writory {
    width: 100%;
  }
}

@media (min-width: 481px) and (max-width: 880px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid--dense {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 881px) and (max-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  nav a {
    font-size: 1rem;
    padding: 0.35rem 0.4rem;
  }
}

@media (max-width: 380px) {
  .nav-toggle-label {
    display: none;
  }

  .brand {
    font-size: 1.25rem;
  }
}
