/* ==========================================================================
   Koeberg Pharmacy - hand-coded rebuild (The Right Media, 2026)
   Theme: navy + pharmacy green from the animated logo, Rubik type.
   Shape system: cards/inputs 12px radius, buttons full pill.
   ========================================================================== */

:root {
  --navy-900: #0b1533;
  --navy-800: #101d42;
  --navy-700: #182a5e;
  --blue: #2050e0;
  --green: #4ecc14;
  --green-dark: #33860d;
  --ink: #16213e;
  --muted: #56607a;
  --line: #dfe5f0;
  --bg: #ffffff;
  --bg-soft: #f3f6fb;
  --radius: 12px;
  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.75rem; font-weight: 600; }

p { margin: 0 0 1rem; }

a { color: var(--blue); }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.btn:active { transform: translateY(1px) scale(0.98); }

.btn-green {
  background: var(--green);
  color: var(--navy-900);
}

.btn-green:hover, .btn-green:focus-visible {
  background: #5fe021;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-outline:hover, .btn-outline:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(11, 21, 51, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}

.brand img { height: 42px; width: 42px; border-radius: 50%; }

.brand span {
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover, .nav-links a:focus-visible {
  color: #fff;
  border-bottom-color: var(--green);
}

.nav-call {
  margin-left: 0.5rem;
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.hero {
  background:
    radial-gradient(900px 500px at 75% 20%, rgba(32, 80, 224, 0.35), transparent 65%),
    radial-gradient(700px 460px at 15% 85%, rgba(78, 204, 20, 0.14), transparent 60%),
    linear-gradient(160deg, var(--navy-800), var(--navy-900));
  color: #fff;
  padding: calc(68px + 3.5rem) 0 4.5rem;
  min-height: 100dvh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-logo img {
  width: 100%;
  max-width: 528px;
  margin: 0 auto;
}

/* Ringpharm affiliation, kept subtle: the logo's navy box blends into the
   hero background, only the wordmark reads. */
.hero-partner {
  margin: 1.5rem 0 0;
  text-align: center;
}

.hero-partner img {
  display: inline-block;
  width: 150px;
  opacity: 0.75;
  transition: opacity 0.25s ease;
}

.hero-partner img:hover { opacity: 1; }

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero h1 strong { color: var(--green); font-weight: 700; }

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 46ch;
}

.hours-card {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  max-width: 430px;
}

.hours-card h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 0.6rem;
}

.hours-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1.5rem;
  margin: 0;
  font-size: 0.97rem;
}

.hours-card dt { font-weight: 500; color: rgba(255, 255, 255, 0.9); }
.hours-card dd { margin: 0; color: rgba(255, 255, 255, 0.75); text-align: right; }

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

/* ---- Sections ---------------------------------------------------------- */

.section { padding: 5rem 0; }

.section-soft { background: var(--bg-soft); }

.section-head { max-width: 640px; margin-bottom: 2.75rem; }

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--green);
  margin-top: 0.7rem;
}

.section-head p { color: var(--muted); margin: 1rem 0 0; }

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

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 3rem;
  align-items: start;
}

.about-copy p { font-size: 1.06rem; color: var(--ink); max-width: 60ch; }

.about-facts { display: grid; gap: 1rem; }

.fact {
  padding: 1.4rem 1.5rem;
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--radius);
}

.fact strong {
  display: block;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
}

.fact span { color: rgba(255, 255, 255, 0.8); font-size: 0.95rem; }

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

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(16, 29, 66, 0.12);
}

.service-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.service-body { padding: 1.5rem 1.6rem 1.7rem; }

.service-body h3 { font-size: 1.15rem; letter-spacing: 0.02em; }

.service-body h3::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--green);
  margin-top: 0.5rem;
}

.service-body p { color: var(--muted); font-size: 0.98rem; margin: 0.9rem 0 0; }

/* ---- Delivery note ------------------------------------------------------ */

.delivery-strip {
  background: var(--navy-800);
  color: #fff;
  padding: 2.5rem 0;
}

.delivery-strip .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.delivery-strip p { margin: 0; font-size: 1.15rem; font-weight: 500; max-width: 56ch; }

.delivery-strip p strong { color: var(--green); }

/* ---- Gallery ------------------------------------------------------------ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 0.9rem;
}

.gallery-grid button {
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--navy-800);
}

.gallery-grid button.tall { grid-row: span 2; }

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-grid button:hover img,
.gallery-grid button:focus-visible img { transform: scale(1.05); opacity: 0.85; }

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 13, 30, 0.94);
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(100%, 1100px);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.lightbox-btn:hover, .lightbox-btn:focus-visible { background: rgba(255, 255, 255, 0.25); }

.lightbox-close { top: 1.25rem; right: 1.25rem; }
.lightbox-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.contact-card {
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-card h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  margin: 1.6rem 0 0.4rem;
}

.contact-card h3:first-child { margin-top: 0; }

.contact-card p, .contact-card dl { margin: 0; color: rgba(255, 255, 255, 0.85); }

.contact-card a { color: #fff; text-decoration-color: var(--green); }

.contact-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1.25rem;
  font-size: 0.95rem;
}

.contact-card dd { margin: 0; text-align: right; color: rgba(255, 255, 255, 0.72); }

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 320px;
}

.map-frame iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* Form */

.contact-form {
  max-width: 720px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }

.form-field.wide { grid-column: 1 / -1; }

.form-field label { font-weight: 500; font-size: 0.95rem; }

.form-field input,
.form-field textarea {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
  padding: 0.75rem 0.9rem;
  border: 1px solid #c3cde0;
  border-radius: var(--radius);
  background: #fff;
  width: 100%;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.form-field textarea { min-height: 140px; resize: vertical; }

.form-actions { margin-top: 1.5rem; text-align: center; }

.form-note {
  display: none;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 500;
}

.form-note.show { display: block; }

.form-note.ok { background: #e5f8db; color: #1e5407; border: 1px solid #9adf78; }

.form-note.fail { background: #fdeaea; color: #8c1c1c; border: 1px solid #f0b3b3; }

.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

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

.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.75);
  padding: 2.25rem 0;
  font-size: 0.95rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; font-weight: 500; }

.footer-brand img { height: 34px; width: 34px; border-radius: 50%; }

.site-footer a { color: #fff; text-decoration-color: var(--green); }

/* ---- Back to top --------------------------------------------------------- */

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(11, 21, 51, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background-color 0.2s ease;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover, .to-top:focus-visible { background: #5fe021; }

.to-top:active { transform: translateY(1px); }

/* ---- Reveal on scroll (progressive enhancement) ------------------------- */

/* Hiding is gated behind html.js (added by main.js) so content always
   shows when JavaScript is unavailable. */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  html.js .reveal.in { opacity: 1; transform: none; }
}

/* ---- Responsive --------------------------------------------------------- */

@media (max-width: 960px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; text-align: left; }
  .hero-logo img { max-width: 360px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 170px; }
}

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .brand span { font-size: 0.95rem; }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-900);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-links a { display: block; padding: 0.8rem 0; border-bottom: 0; }

  .nav-call { margin: 0.75rem 0 0; justify-content: center; }

  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 3.5rem 0; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .form-grid { grid-template-columns: 1fr; }
  .hours-card dd { text-align: left; }
}
