/* ============================================================
   Urgencia.se — Main Stylesheet
   Brand: Green #008F53 | Dark #242223 | Font: Montserrat
   ============================================================ */

/* ─── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Colors */
  --color-bg:          #f7faf7;
  --color-surface:     #ffffff;
  --color-surface-2:   #f0f5f1;
  --color-surface-3:   #e3ece4;

  --color-green:       #008F53;
  --color-green-light: #00a862;
  --color-green-dark:  #006b3e;
  --color-green-muted: rgba(0, 143, 83, 0.1);

  --color-dark:        #242223;
  --color-dark-2:      #1a1819;

  --color-text:        #1a1c1a;
  --color-text-muted:  #4a524a;
  --color-text-subtle: #7a827a;
  --color-border:      rgba(0,0,0,0.09);
  --color-border-hover:rgba(0,143,83,0.4);

  --color-white:       #ffffff;
  --color-error:       #e05050;
  --color-success:     #00a862;

  /* Typography */
  --font-main:    'Montserrat', system-ui, -apple-system, sans-serif;
  --font-mono:    'Courier New', monospace;

  /* Font weights */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-extrabold:800;
  --fw-black:    900;

  /* Font sizes (fluid clamp) */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  clamp(1.5rem, 3vw, 2rem);
  --text-4xl:  clamp(2rem, 4vw, 2.75rem);
  --text-5xl:  clamp(2.5rem, 5vw, 3.5rem);
  --text-6xl:  clamp(3rem, 6vw, 4.5rem);
  --text-hero: clamp(3.5rem, 8vw, 6rem);

  /* Line heights */
  --leading-tight:  1.15;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-relaxed:1.8;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1200px;
  --container-2xl: 1400px;

  /* Borders & Radius */
  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  12px;
  --radius-xl:  20px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.07);
  --shadow:     0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.14);
  --shadow-green: 0 4px 24px rgba(0,143,83,0.20);

  /* Transitions */
  --transition:     0.2s ease;
  --transition-med: 0.35s ease;
  --transition-slow:0.5s ease;

  /* Z-indices */
  --z-base:    1;
  --z-dropdown:100;
  --z-sticky:  200;
  --z-modal:   300;
  --z-toast:   400;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-weight: var(--fw-regular);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

/* ─── Text gradient (hero highlight) ────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #00c97b 0%, #008F53 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

/* ─── Layout Containers ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--sm  { max-width: var(--container-sm); }
.container--md  { max-width: var(--container-md); }
.container--lg  { max-width: var(--container-lg); }
.container--2xl { max-width: var(--container-2xl); }

@media (max-width: 640px) {
  .container { padding-inline: var(--space-4); }
}

/* ─── Typography ────────────────────────────────────────────── */
.text-hero  { font-size: var(--text-hero);  font-weight: var(--fw-black);  line-height: var(--leading-tight); }
.text-6xl   { font-size: var(--text-6xl);   font-weight: var(--fw-extrabold); }
.text-5xl   { font-size: var(--text-5xl);   font-weight: var(--fw-bold); }
.text-4xl   { font-size: var(--text-4xl);   font-weight: var(--fw-bold); }
.text-3xl   { font-size: var(--text-3xl);   font-weight: var(--fw-bold); }
.text-2xl   { font-size: var(--text-2xl);   font-weight: var(--fw-semibold); }
.text-xl    { font-size: var(--text-xl); }
.text-lg    { font-size: var(--text-lg); }
.text-sm    { font-size: var(--text-sm); }
.text-xs    { font-size: var(--text-xs); }

.text-muted  { color: var(--color-text-muted); }
.text-subtle { color: var(--color-text-subtle); }
.text-green  { color: var(--color-green); }
.text-center { text-align: center; }
.text-upper  { text-transform: uppercase; letter-spacing: 0.08em; }

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-green);
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--fw-extrabold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 56ch;
  line-height: var(--leading-relaxed);
}

/* ─── Sections ──────────────────────────────────────────────── */
.section {
  padding-block: var(--space-24);
}

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

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

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

.section--darker {
  background-color: #1a1c1a;
  color: #f0f0ee;
}

.section--darker .section-title,
.section--darker h2,
.section--darker h3 {
  color: #f0f0ee;
}

.section--darker .section-subtitle,
.section--darker p {
  color: rgba(240,240,238,0.75);
}

.section-header {
  margin-bottom: var(--space-16);
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-subtitle {
  margin-inline: auto;
}

/* ─── Grid ───────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

.grid--auto-sm {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.grid--auto-md {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius);
  font-weight: var(--fw-semibold);
  font-size: var(--text-base);
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background-color: var(--color-green);
  color: var(--color-white);
  border-color: var(--color-green);
}

.btn--primary:hover {
  background-color: var(--color-green-light);
  border-color: var(--color-green-light);
  color: var(--color-white);
  box-shadow: var(--shadow-green);
  transform: translateY(-1px);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-green);
  color: var(--color-green);
  background-color: var(--color-green-muted);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-green);
  border-color: transparent;
  padding-inline: var(--space-2);
}

.btn--ghost:hover {
  color: var(--color-green-light);
}

/* Shop button — visually distinct (external Shopify link) */
.btn--shop {
  background-color: transparent;
  color: var(--color-green);
  border-color: var(--color-green);
}

.btn--shop:hover {
  background-color: var(--color-green);
  color: var(--color-white);
  box-shadow: var(--shadow-green);
}

.btn--shop .icon-external {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
}

.btn--lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--transition-med);
}

.card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card--link:hover {
  cursor: pointer;
}

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge--green {
  background-color: var(--color-green-muted);
  color: var(--color-green);
  border: 1px solid rgba(0,143,83,0.3);
}

.badge--outline {
  background-color: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* ─── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--color-border);
  border: none;
  margin-block: var(--space-8);
}

/* ─── Forms ─────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
}

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: var(--text-base);
  transition: border-color var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(0,143,83,0.15);
}

.form-control::placeholder {
  color: var(--color-text-subtle);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ─── AFA Badge ──────────────────────────────────────────────── */
.afa-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(135deg, rgba(0,143,83,0.15), rgba(0,143,83,0.05));
  border: 1px solid rgba(0,143,83,0.35);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-green);
}

.afa-badge__icon {
  width: 32px;
  height: 32px;
  background-color: var(--color-green);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-lg);
  color: white;
  font-weight: var(--fw-black);
}

/* ─── Check List ─────────────────────────────────────────────── */
.check-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-base);
  line-height: var(--leading-snug);
}

.check-list li::before {
  content: '';
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23008F53'%3E%3Ccircle cx='10' cy='10' r='10' opacity='0.15'/%3E%3Cpath d='M6 10l3 3 5-6' stroke='%23008F53' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── Stats Row ──────────────────────────────────────────────── */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: var(--fw-black);
  color: var(--color-green);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ─── Breadcrumbs ────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.breadcrumb a:hover { color: var(--color-green); }

.breadcrumb__sep {
  opacity: 0.4;
}

/* ─── Page Hero (inner pages) ────────────────────────────────── */
.page-hero {
  padding-top: calc(80px + var(--space-16));
  padding-bottom: var(--space-16);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}

.page-hero__label {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-green);
  margin-bottom: var(--space-3);
}

.page-hero__title {
  font-size: var(--text-5xl);
  font-weight: var(--fw-black);
  margin-bottom: var(--space-4);
}

.page-hero__subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: var(--leading-relaxed);
}

/* ─── Tables ─────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background-color: var(--color-surface-2);
  padding: var(--space-4) var(--space-5);
  text-align: left;
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-base);
}

tr:hover td { background-color: var(--color-surface); }

/* ─── Utility Classes ────────────────────────────────────────── */
.flex          { display: flex; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-2         { gap: var(--space-2); }
.gap-4         { gap: var(--space-4); }
.gap-6         { gap: var(--space-6); }
.gap-8         { gap: var(--space-8); }
.mt-2          { margin-top: var(--space-2); }
.mt-4          { margin-top: var(--space-4); }
.mt-6          { margin-top: var(--space-6); }
.mt-8          { margin-top: var(--space-8); }
.mt-12         { margin-top: var(--space-12); }
.mb-2          { margin-bottom: var(--space-2); }
.mb-4          { margin-bottom: var(--space-4); }
.mb-6          { margin-bottom: var(--space-6); }
.mb-8          { margin-bottom: var(--space-8); }
.mb-12         { margin-bottom: var(--space-12); }
.w-full        { width: 100%; }
.hidden        { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ─── Selection ──────────────────────────────────────────────── */
::selection {
  background-color: var(--color-green);
  color: var(--color-white);
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-green-dark); }

/* ─── Focus visible ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 3px;
}

/* ─── Industry grid (kurssidor) ─────────────────────────────── */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.industry-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: border-color .18s, background .18s;
}
.industry-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-green-muted);
}
.industry-card__icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.industry-card__name {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: 2px;
}
.industry-card__note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ─── Image placeholders ─────────────────────────────────────── */
.img-placeholder {
  background: linear-gradient(135deg, var(--color-surface-2), var(--color-surface-3));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-subtle);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  text-align: center;
  border: 1px dashed var(--color-border);
}
