/* ==========================================================================
   Kaffeknappen — Design System
   Lean, framework-free CSS extracted from the main Kaffeknappen brand site
   for use on kaffemaskin-til-bedrift.no and other single-purpose SEO pages.
   ========================================================================== */

/* ---- Fonts (Silka) -------------------------------------------------------
   WOFF2 only — subset (latin + latin-ext) via pyftsubset from the OTF/TTF
   originals kept in fonts/. Re-run the subset if the character set grows.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Silka';
  src: url('../fonts/Silka-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Silka';
  src: url('../fonts/Silka-RegularItalic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Silka';
  src: url('../fonts/silka-medium-webfont.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Silka';
  src: url('../fonts/silka-semibold-webfont.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Silka';
  src: url('../fonts/silka-bold-webfont.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens -------------------------------------------------------
   Same custom-property names as the main Webflow site (css/kaffeknappen.css)
   so components can be ported between the two without renaming colors.
   -------------------------------------------------------------------------- */
:root {
  --dyp-bla: #0a1228; /* navy — headings, primary text, footer/testimonial bg */
  --primary-1: #e24747; /* red — primary CTA */
  --hvit: #ffffff;
  --gray-4: #f8f6f4;
  --gray-3: #ecebea;
  --primary-2: #f9f2ea; /* cream — section backgrounds */
  --gray-1: #222525;
  --varm-bla: #98aee5; /* support blue */
  --gray-2: #62636b;
  --success: #57a773;
  --kaffe: #2b0000; /* dark coffee accent */
  --warning: #f19953;

  --font-body: 'Silka', Arial, sans-serif;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;

  --shadow-card: 0 8px 24px rgba(10, 18, 40, 0.08);
  --shadow-elevated: 0 16px 40px rgba(10, 18, 40, 0.14);

  --container-w: 1200px;
  --space-section: clamp(56px, 8vw, 112px);
}

/* ---- Reset --------------------------------------------------------------- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gray-1);
  background: var(--hvit);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) {
  .container {
    padding-inline: 40px;
  }
}

section {
  padding-block: var(--space-section);
}

/* ---- Typography ----------------------------------------------------------*/
h1,
h2,
h3,
h4 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--dyp-bla);
  margin: 0 0 0.5em;
  line-height: 1.15;
}
h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}
h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
}
p {
  margin: 0 0 1em;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-1);
  margin-bottom: 12px;
}
.lede {
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  color: var(--gray-2);
}
.text-center {
  text-align: center;
}
.section-head {
  max-width: 700px;
  margin: 0 auto 48px;
}
.section-head.left {
  margin-inline: 0;
}

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--primary-1);
  color: var(--hvit);
}
.btn-primary:hover {
  background: #cc3a3a;
  box-shadow: var(--shadow-elevated);
}
.btn-dark {
  background: var(--dyp-bla);
  color: var(--hvit);
}
.btn-dark:hover {
  background: #050a18;
  box-shadow: var(--shadow-elevated);
}
.btn-outline {
  background: transparent;
  border-color: var(--hvit);
  color: var(--hvit);
}
.btn-outline:hover {
  background: var(--hvit);
  color: var(--dyp-bla);
}
.btn-block {
  width: 100%;
}

/* ---- Header / nav ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gray-3);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.site-header .logo img {
  height: 32px;
  width: auto;
}
.site-header nav ul {
  display: flex;
  gap: 28px;
}
.site-header nav a {
  font-weight: 500;
  font-size: 0.95rem;
}
.site-header nav {
  display: none;
}
@media (min-width: 900px) {
  .site-header nav {
    display: block;
  }
}

/* ---- Hero -----------------------------------------------------------------
   No photo: pure CSS gradients keep the largest render text (fast LCP) and
   avoid shipping a hero-sized image altogether.
   ---------------------------------------------------------------------------- */
.hero {
  position: relative;
  color: var(--hvit);
  padding-block: clamp(90px, 16vw, 160px) clamp(56px, 10vw, 96px);
  background: linear-gradient(160deg, #101c42 0%, var(--dyp-bla) 55%, #060b1c 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 420px at 85% 10%, rgba(152, 174, 229, 0.16), transparent 70%),
    radial-gradient(640px 480px at -5% 100%, rgba(226, 71, 71, 0.12), transparent 70%);
  z-index: 0;
}
.hero .container {
  position: relative;
  z-index: 1;
  max-width: 780px;
}
.hero h1 {
  color: var(--hvit);
}
.hero .lede {
  color: rgba(255, 255, 255, 0.85);
}
.hero .eyebrow {
  color: #ffb4b4;
}

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 28px;
  font-size: 0.9rem;
  font-weight: 500;
}
.trust-bar li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.trust-bar li::before {
  content: '✓';
  color: #7de08f;
  font-weight: 700;
}

/* ---- Cards / grid -------------------------------------------------------*/
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 {
  grid-template-columns: 1fr;
}
.grid-3 {
  grid-template-columns: 1fr;
}
.grid-4 {
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--hvit);
  border-radius: var(--radius-m);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.card img {
  border-radius: var(--radius-s);
  margin-bottom: 20px;
}
.card h3 {
  margin-bottom: 8px;
}
.card p {
  color: var(--gray-2);
  margin-bottom: 0;
}

.machine-card {
  text-align: center;
}
.machine-card .thumb {
  background: var(--gray-4);
  border-radius: var(--radius-m);
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
}
.machine-card .thumb img {
  max-height: 100%;
  width: auto;
  margin: 0;
}
.machine-card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* ---- Steps (how it works) ----------------------------------------------*/
.steps {
  counter-reset: step;
}
.step {
  position: relative;
  padding-left: 56px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-1);
  color: var(--hvit);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Sections ------------------------------------------------------------*/
.section-cream {
  background: var(--primary-2);
}
.section-navy {
  background: var(--dyp-bla);
  color: var(--hvit);
}
.section-navy h2,
.section-navy h3 {
  color: var(--hvit);
}
.section-navy p {
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Logo bar ------------------------------------------------------------*/
.logo-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 700px) {
  .logo-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 960px) {
  .logo-bar {
    grid-template-columns: repeat(6, 1fr);
  }
}
.logo-bar .slot {
  aspect-ratio: 3 / 2;
  background: var(--gray-3);
  border-radius: var(--radius-s);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-2);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ---- Testimonial ----------------------------------------------------------*/
.testimonial {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.testimonial .mark {
  font-size: 3rem;
  color: var(--primary-1);
  line-height: 1;
  margin-bottom: 8px;
}
.testimonial blockquote {
  margin: 0 0 24px;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 500;
}
.testimonial .author {
  font-weight: 600;
}
.testimonial .author span {
  display: block;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* ---- FAQ / accordion -------------------------------------------------------*/
.faq-item {
  border-bottom: 1px solid var(--gray-3);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-weight: 600;
  color: var(--dyp-bla);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--primary-1);
  margin-left: 16px;
}
.faq-item[open] summary::after {
  content: '–';
}
.faq-item .faq-body {
  padding-bottom: 20px;
  color: var(--gray-2);
}

/* ---- Final CTA panel --------------------------------------------------------*/
.cta-panel {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.cta-panel .cta-micro {
  font-size: 0.85rem;
  color: var(--gray-2);
  margin-top: 14px;
  margin-bottom: 0;
}

/* ---- Footer ------------------------------------------------------------------*/
.site-footer {
  background: var(--kaffe);
  color: rgba(255, 255, 255, 0.7);
  padding-block: 40px;
  font-size: 0.9rem;
}
.site-footer a:hover {
  color: var(--hvit);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

/* ---- Inline content links (to kaffeknappen.no) --------------------------- */
p a,
.faq-body a {
  color: var(--primary-1);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(226, 71, 71, 0.35);
  text-underline-offset: 3px;
}
p a:hover,
.faq-body a:hover {
  text-decoration-color: currentColor;
}
.card h3 a,
.machine-card h3 a {
  color: inherit;
  text-decoration: none;
}
.card h3 a:hover,
.machine-card h3 a:hover {
  color: var(--primary-1);
}
.section-navy p a {
  color: #ffb4b4;
}

.hero-alt-link {
  display: block;
  margin-top: 14px;
  color: #ffb4b4;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-alt-link:hover {
  color: var(--hvit);
}

/* ---- Utilities ---------------------------------------------------------------*/
.mt-0 {
  margin-top: 0;
}
.hidden {
  display: none;
}
