html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f8f8f6;
  color: #1a1a1a;
}

a { color: inherit; text-decoration: none; }

/* Header */
header {
  background: #fff;
  border-bottom: 1px solid #e8e8e4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.swagger-link {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #aaa;
  border: 1px solid #ddd;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.swagger-link:hover {
  color: #e05a00;
  border-color: #e05a00;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1a1a1a;
}

.logo span { color: #e05a00; }

header nav a {
  font-size: 0.85rem;
  color: #888;
  transition: color 0.2s;
}

header nav a:hover { color: #e05a00; }

header nav {
  display: flex;
  gap: 1.5rem;
}

@media (max-width: 700px) {
  header { padding: 1rem 1.25rem; }
  .header-left { gap: 0.75rem; }
  .swagger-link { display: none; }
  /* Logo on its own line, menu underneath and wrapping if needed */
  header {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  header nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
  }
  header nav a {
    font-size: 0.85rem;
    padding: 0.2rem 0;
  }
}

/* Hero */
.hero {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 14px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 14px),
    linear-gradient(150deg, rgba(31,38,32,0.9) 0%, rgba(43,49,40,0.88) 45%, rgba(35,32,28,0.92) 100%),
    url('/web/01_images/02_tunnel_boring.jpeg');
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  background-size: auto, auto, cover, cover;
  background-position: center, center, center, center;
  color: #fff;
  padding: 7rem 2.5rem 6rem;
  min-height: 420px;
  display: flex;
  align-items: center;
  border-radius: 0 0 28px 28px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: 220px;
  background: linear-gradient(135deg, rgba(224, 90, 0, 0.35) 0%, rgba(224, 90, 0, 0) 60%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -140px;
  right: -100px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(122, 168, 116, 0.28) 0%, rgba(122, 168, 116, 0) 70%);
  border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  pointer-events: none;
}

.hero-content { max-width: clamp(680px, 45vw, 880px); }

.hero-label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e05a00;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 2rem + 1.2vw, 3.8rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: clamp(1.05rem, 0.75rem + 0.45vw, 1.35rem);
  opacity: 0.75;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 34em;
}

.cta-btn {
  display: inline-block;
  background: #e05a00;
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}

.cta-btn:hover { background: #c44f00; }

.cta-btn-subtle {
  margin-top: 0.85rem;
  padding: 0.4rem 1.2rem;
  font-size: 0.75rem;
  background: transparent;
  color: #e05a00;
  border: 1px solid #e05a00;
}

.cta-btn-subtle:hover {
  background: #e05a00;
  color: #fff;
}

.hero .cta-btn {
  font-size: clamp(0.9rem, 0.65rem + 0.35vw, 1.1rem);
  padding: 0.83em 2.2em;
}

@media (max-width: 768px) {
  .hero {
    background:
      repeating-linear-gradient(45deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 14px),
      repeating-linear-gradient(-45deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 14px),
      linear-gradient(150deg, rgba(31,38,32,0.55) 0%, rgba(43,49,40,0.5) 45%, rgba(35,32,28,0.6) 100%),
      url('/web/01_images/02_tunnel_boring.jpeg');
    background-repeat: repeat, repeat, no-repeat, no-repeat;
    background-size: auto, auto, cover, cover;
    background-position: center, center, center, center;
  }

  .hero-content {
    position: relative;
    padding: 1.5rem 1.25rem;
    border-radius: 12px;
  }

  .hero-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(20,24,20,0.82) 0%, rgba(20,24,20,0.72) 100%);
    border-radius: 12px;
    z-index: 0;
  }

  .hero-label, .hero h1, .hero-sub, .cta-btn {
    position: relative;
    z-index: 1;
  }

  .hero-sub { opacity: 0.9; }
}

/* How it works */
.how-section {
  max-width: 1000px;
  margin: 5rem auto;
  padding: 0 2rem;
}

.how-section h2, .banner-section h2, .about-section h2, .example-section h2, .try-section h2, .price-section h2 {
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.step {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.step-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: #e8e8e4;
  margin-bottom: 1rem;
  line-height: 1;
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.step p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
}

/* Discreet link inside a step's text */
.step-link {
  text-decoration: underline;
  white-space: nowrap;
  transition: color 0.2s;
}

.step-link:hover { color: #e05a00; }

.how-cta {
  text-align: center;
  margin-top: 3rem;
}

/* Banner section */
.banner-section {
  background: #fff;
  padding: 5rem 2rem;
  text-align: center;
}

.section-sub {
  color: #888;
  font-size: 0.95rem;
  margin-top: -1.5rem;
  margin-bottom: 3rem;
}

.banner-stage {
  display: flex;
  justify-content: center;
}

.banner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

/* Real photos of the sign on-site */
.banner-gallery {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.banner-photo {
  width: 420px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

@media (max-width: 700px) {
  .banner-section {
    padding: 3rem 1rem;
  }

  .banner-gallery {
    width: 100%;
    gap: 1rem;
  }

  .banner-photo {
    width: 100%;
  }
}

.banner-caption {
  font-size: 0.8rem;
  color: #aaa;
  letter-spacing: 0.05em;
}

/* Example project */
.example-section {
  max-width: 1000px;
  margin: 5rem auto;
  padding: 0 2rem;
}

.example-card {
  display: flex;
  gap: 2rem;
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s, transform 0.2s;
}

.example-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.example-images {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.example-images img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
}

.example-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.example-tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e05a00;
  margin-bottom: 0.5rem;
}

.example-text h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.example-text p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.example-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e05a00;
}

@media (max-width: 700px) {
  .example-card {
    flex-direction: column;
  }
  .example-images img {
    width: 100%;
    height: 160px;
  }
}

/* Prøv selv: editor on the left, preview of the project page on the right */
.try-section {
  max-width: 1000px;
  margin: 5rem auto;
  padding: 0 2rem;
  scroll-margin-top: 90px;
}

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

/* The white card, like the "Se et eksempel" card. Its top (.try-toggle) is always shown and
   opens/closes the editor and preview under it (class "editing" on the section). */
.try-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s, transform 0.2s;
}
.try-section:not(.editing) .try-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.try-toggle {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  cursor: pointer;
  border-radius: 8px;
}
.try-toggle:focus-visible { outline: 2px solid #e05a00; outline-offset: -2px; }

.try-icon {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 6px;
  background: #fdf0e8;
  color: #e05a00;
  display: flex;
  align-items: center;
  justify-content: center;
}
.try-icon svg { width: 64px; height: 64px; }

.try-toggle-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.try-toggle-text h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}
.try-toggle-text p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

/* Open: the editor and preview under the top, separated by a line. */
.try-section:not(.editing) .try-layout { display: none; }
.try-card .try-layout {
  border-top: 1px solid #eee;
  padding: 2rem;
}
/* Inside the card the editor needs no card of its own. */
.try-card .try-editor { box-shadow: none; padding: 0; border-radius: 0; }

@media (max-width: 700px) {
  .try-toggle { flex-direction: column; gap: 1.25rem; padding: 1.25rem; }
  .try-icon { width: 100%; height: 120px; }
  .try-card .try-layout { padding: 1.25rem; }
}

.try-continue {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
}
.try-editor button.try-continue {
  background: #e05a00;
  border: 1px solid #e05a00;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
}
.try-editor button.try-continue:hover { background: #c44f00; border-color: #c44f00; }

.try-editor {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.try-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.try-field label, .try-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #333;
}

.try-editor input[type="text"], .try-editor textarea {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.try-editor input[type="text"]:focus, .try-editor textarea:focus {
  outline: none;
  border-color: #e05a00;
  box-shadow: 0 0 0 3px rgba(224,90,0,0.1);
  background: #fff;
}

.try-editor textarea { resize: vertical; }

#try-phases {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.try-phase-description { grid-column: 1 / -1; }

/* One phase: name and time period, then "Ferdig" and the remove button; description underneath */
.try-phase {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.try-field label.try-phase-done {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}

.try-phase-done input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #e05a00;
  cursor: pointer;
}

.try-editor button {
  border-radius: 5px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.try-phase-remove {
  width: 2rem;
  height: 2rem;
  font-size: 1.1rem;
  line-height: 1;
  background: #fff;
  color: #888;
  border: 1px solid #ddd;
}

.try-phase-remove:hover { color: #d93025; border-color: #f0c4c0; }

.try-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.try-add, .try-reset {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  background: transparent;
}

.try-add {
  color: #e05a00;
  border: 1px solid #e05a00;
}

.try-add:hover { background: #e05a00; color: #fff; }

.try-reset {
  color: #888;
  border: 1px solid #ddd;
}

.try-reset:hover { color: #1a1a1a; border-color: #aaa; }

.try-preview-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  margin-bottom: 0.6rem;
}

/* The preview. Copied from the project pages under web/c/ (index.css), scoped to the preview,
   so it looks like the real page. Keep in sync if that design changes (web/kunde/index.css
   has the same copy). */
.preview-page {
  background-color: #f0f4f8;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: #222;
}

.preview-hero {
  background: linear-gradient(135deg, #003d7a, #0066cc);
  color: #fff;
  text-align: center;
  padding: 1.75rem 1rem;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.preview-hero:empty { display: none; }

.preview-page .card {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.preview-page .card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #003d7a;
  margin-bottom: 0.75rem;
}

.preview-page .card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
  overflow-wrap: anywhere;
}

/* Same as the project page (web/project.js): line breaks are kept. */
#try-preview-description, #try-preview-responsible { white-space: pre-line; }

.preview-page .timeline {
  list-style: none;
  position: relative;
}

.preview-page .timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1.5rem;
  padding-left: 0.25rem;
}

.preview-page .timeline-item:last-child { padding-bottom: 0; }

.preview-page .timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.75rem;
  width: 2px;
  height: calc(100% - 1rem);
  background: #d8dfe8;
}

.preview-page .timeline-item.done:not(:last-child)::before { background: #2e9e5b; }

.preview-page .timeline-dot {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  z-index: 1;
}

.preview-page .timeline-item.done .timeline-dot {
  background: #2e9e5b;
  color: #fff;
}

.preview-page .timeline-item.upcoming .timeline-dot {
  background: #f0f4f8;
  border: 2px solid #b8c2cf;
}

.preview-page .timeline-content {
  display: flex;
  flex-direction: column;
  padding-top: 0.15rem;
}

.preview-page .timeline-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
}

.preview-page .timeline-item.upcoming .timeline-label { color: #777; }

.preview-page .timeline-date {
  font-size: 0.85rem;
  color: #666;
}

/* The sign, in a frame as wide as the cards above it. The QR code, the logo and the headline
   each fill about 80% of the frame's width, as on the banner.
   The children's sizes are in cqw (1% of the frame's width), so they scale with the frame.
   The frame's own padding is in % — cqw on the container itself would not refer to the frame. */
.try-sign {
  container-type: inline-size;
  background: #fff;
  border: 1px solid #d8dfe8;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7% 4%;
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
  color: #111;
}

.try-sign[hidden], .try-sign-note[hidden] { display: none; }

.try-sign > * + * { margin-top: 4cqw; }

.try-sign-brand {
  font-size: 14cqw;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.try-sign-brand span { color: #e05a00; }

.try-sign-qr { width: 80cqw; }
.try-sign-qr svg { width: 100%; height: auto; display: block; }
.try-sign-qr .digger { fill: #e05a00; }

.try-sign-headline {
  font-size: 11.5cqw;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.try-sign-lead {
  font-size: 3.6cqw;
  line-height: 1.4;
  color: #222;
}

.try-sign-note {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #666;
}

.try-sign-note a { color: #e05a00; }
.try-sign-note a:hover { text-decoration: underline; }

@media (max-width: 800px) {
  .try-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .try-section { padding: 0 1.25rem; }
  .try-editor { padding: 1.25rem; }
  /* Name on its own line, the rest underneath */
  .try-phase { grid-template-columns: minmax(0, 1fr) auto auto; }
  .try-phase-name { grid-column: 1 / -1; }
}

/* Price (cards reuse .steps / .step) */
.price-section {
  max-width: 1000px;
  margin: 5rem auto;
  padding: 0 2rem;
  scroll-margin-top: 90px;
}

.price-amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: #e05a00;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.price-amount span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: #888;
}

.price-highlight {
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background: #fff;
  border-left: 4px solid #e05a00;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .price-section { padding: 0 1.25rem; }
  .price-highlight { padding: 0.9rem 1.1rem; font-size: 1rem; }
}

/* Compliance */
.compliance-section {
  max-width: 1000px;
  margin: 5rem auto;
  padding: 0 2rem;
  scroll-margin-top: 90px;
}

.compliance-section h2 {
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

.compliance-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.compliance-list li {
  padding: 1.1rem 1.5rem;
  background: #fff;
  border-left: 4px solid #e05a00;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.compliance-list h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.compliance-list p {
  color: #666;
  font-size: 0.95rem;
}

.compliance-list p + p { margin-top: 0.6rem; }

@media (max-width: 700px) {
  .compliance-section { padding: 0 1.25rem; }
}

/* About */
.about-section {
  max-width: 1000px;
  margin: 5rem auto;
  padding: 0 2rem;
  scroll-margin-top: 90px;
}

.about-inner {
  background: #fff;
  border-radius: 8px;
  padding: 3rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.about-text p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 1rem;
  max-width: 640px;
}

.about-text a { color: #e05a00; }
.about-text a:hover { text-decoration: underline; }

.org-number {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: #999;
}

/* Footer */
footer {
  background: #1a1a1a;
  color: #666;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.82rem;
}

footer a { color: #e05a00; }
footer a:hover { text-decoration: underline; }

/* Mobile: the sticky header is taller (menu on its own line),
   so menu jumps must stop further down to keep headings visible.
   Kept last so it overrides the section rules above. */
@media (max-width: 700px) {
  .try-section, .price-section, .compliance-section, .about-section { scroll-margin-top: 120px; }
}
