/*
  trappen.se — our company website. Loaded only by CompanyLayout, on top of site.css (fonts, focus ring,
  notices, form errors). Its own look, taken from the Swedish stairwell:

    wall    #E5ECE3  the pale green stairwell wall (page)
    deep    #D6E1D3  a darker band of the same paint (alternate sections)
    paper   #F8FAF6  the notice on the wall (form)
    felt    #1E2B26  the name board's felt (board, buttons, footer)
    letter  #F3F2EC  the board's white plastic letters
    brass   #B48A3C  the board's frame (decoration only); #6F5420 when it is text

  One bold element — the name board in the hero. Everything else stays quiet and left-aligned.
*/

.co {
  --co-wall: #E5ECE3;
  --co-deep: #D6E1D3;
  --co-paper: #F8FAF6;
  --co-felt: #1E2B26;
  --co-letter: #F3F2EC;
  --co-brass: #B48A3C;
  --co-brass-ink: #6F5420;
  --co-ink: #17201C;
  --co-muted: #46544E;
  --co-line: #7A8982;
  --co-wrap: 72rem;

  min-height: 100vh;
  background: var(--co-wall);
  color: var(--co-ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
}

body:has(> .co) {
  background: var(--co-wall);
}

.co h1,
.co h2,
.co h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--co-ink);
  letter-spacing: -0.015em;
}

.co a {
  color: var(--co-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.co-wrap {
  max-width: var(--co-wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Header */

.co-header {
  padding-block: 1.25rem;
}

.co-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.co-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.co-mark {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--co-felt);
}

.co-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 1rem;
}

.co-nav a:not(.co-button) {
  text-decoration: none;
}

.co-nav a:not(.co-button):hover {
  text-decoration: underline;
}

/* Buttons: a small felt plate, not a pill — the product's own pages use pills. */

.co .co-button {
  display: inline-block;
  padding: 0.8rem 1.35rem;
  border: 2px solid var(--co-felt);
  border-radius: 6px;
  background: var(--co-felt);
  color: var(--co-letter);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.co .co-button:hover {
  background: #2C3D36;
}

.co .co-button-ghost {
  background: transparent;
  color: var(--co-felt);
}

.co .co-button-ghost:hover {
  background: rgba(30, 43, 38, 0.08);
}

.co .co-button-small {
  padding: 0.5rem 0.9rem;
}

/* Hero: text on the wall, the name board beside it */

.co-hero {
  padding-block: 3rem 3.5rem;
}

.co-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 4rem;
  align-items: center;
}

.co-hero h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.5rem, 5.2vw, 4.25rem);
  line-height: 1.04;
  max-width: 17ch;
}

.co-lead {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: 1.3rem;
  color: var(--co-muted);
}

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

/* The name board (namntavla): brass frame, grooved felt, white letters on the grooves. */

.co-board {
  justify-self: end;
  width: 100%;
  max-width: 25rem;
  padding: 0.7rem;
  border-radius: 4px;
  background: linear-gradient(135deg, #CFA75A 0%, var(--co-brass) 45%, #8E6B2B 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 18px 40px -20px rgba(23, 32, 28, 0.55);
}

.co-board-felt {
  --groove: 2.4rem;
  padding: 1.6rem 1.6rem 1.2rem;
  border-radius: 2px;
  background-color: var(--co-felt);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--groove) - 1px),
    rgba(0, 0, 0, 0.35) calc(var(--groove) - 1px),
    rgba(0, 0, 0, 0.35) var(--groove)
  );
  background-position: 0 1.1rem;
  color: var(--co-letter);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: var(--groove);
}

.co-board-house {
  margin: 0 0 var(--groove);
  text-align: center;
  font-size: 1.15rem;
  letter-spacing: 0.32em;
}

.co-board ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.co-board li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

/* Dot leaders between the name and the floor, like the letters were spaced out by hand. */
.co-board li::after {
  content: "";
  order: 1;
  flex: 1;
  border-bottom: 2px dotted rgba(243, 242, 236, 0.55);
  transform: translateY(-0.3em);
}

.co-board li span:last-child {
  order: 2;
}

/* Pressed in by hand: not every letter sits perfectly straight. */
.co-board li:nth-child(3) span:first-child {
  transform: translateY(-1px) rotate(-0.6deg);
  display: inline-block;
}

.co-board-note {
  margin: var(--groove) 0 0;
  font-size: 0.95rem;
}

.co-board-note span:last-child {
  display: inline-block;
  transform: rotate(-1.2deg);
}

/* Sections */

.co-section {
  padding-block: 4.5rem;
}

.co-section-tinted {
  background: var(--co-deep);
}

.co-section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.1;
}

.co-section-lead {
  margin: 0 0 2.5rem;
  max-width: 40rem;
  color: var(--co-muted);
  font-size: 1.2rem;
}

/* "Det här ingår": four floors, as in the name board. */

.co-floors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 4rem;
  margin: 0;
}

.co-floors > div {
  padding-top: 1.1rem;
  border-top: 2px solid var(--co-felt);
}

.co-floors dt {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
}

.co-floor {
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--co-brass-ink);
  font-size: 1rem;
  font-weight: 600;
}

.co-floors dd {
  margin: 0;
  max-width: 34rem;
  color: var(--co-muted);
}

/* "Så går det till": a real sequence, so numbered. */

.co-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.co-steps li {
  counter-increment: step;
}

.co-steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.75rem;
  line-height: 1;
  color: var(--co-brass-ink);
}

.co-steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.co-steps p {
  margin: 0;
  color: var(--co-muted);
  font-size: 1.05rem;
}

/* "Tryggt för föreningen" */

.co-promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.co-promises > div {
  padding-left: 1.1rem;
  border-left: 3px solid var(--co-brass);
}

.co-promises h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.co-promises p {
  margin: 0;
  color: var(--co-muted);
  font-size: 1.05rem;
}

/* Pilot and the interest form */

.co-pilot {
  background: var(--co-deep);
}

.co-pilot-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 4rem;
  align-items: start;
}

.co-pilot-text p {
  max-width: 32rem;
  color: var(--co-muted);
}

.co-form-card {
  padding: 2rem;
  border-radius: 6px;
  background: var(--co-paper);
  box-shadow: 0 1px 0 rgba(23, 32, 28, 0.08), 0 12px 30px -18px rgba(23, 32, 28, 0.4);
}

.co-form {
  display: grid;
  gap: 1.1rem;
}

.co-field {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.co-field label {
  font-weight: 700;
  font-size: 1rem;
}

.co-optional {
  font-weight: 400;
  color: var(--co-muted);
}

.co-field input,
.co-field textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--co-line);
  border-radius: 4px;
  background: #FFFFFF;
  color: var(--co-ink);
  font: inherit;
  font-size: 1rem;
}

.co-field textarea {
  resize: vertical;
}

.co-field-short input {
  max-width: 10rem;
}

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

.co-form .co-button {
  justify-self: start;
  margin-top: 0.4rem;
}

.co-fineprint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--co-muted);
}

/* Honeypot: off screen for people, still in the form for bots. */
.co-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Privacy page and other text pages */

.co-prose {
  max-width: 44rem;
  padding-block: 2.5rem 5rem;
}

.co-prose h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  line-height: 1.1;
}

.co-prose h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.4rem;
}

.co-prose p {
  margin: 0 0 1rem;
}

.co-updated {
  color: var(--co-muted);
  font-size: 1rem;
}

/* Footer: the felt again */

.co-footer {
  padding-block: 3rem;
  background: var(--co-felt);
  color: var(--co-letter);
}

.co-footer a {
  color: var(--co-letter);
}

.co-footer p {
  margin: 0.5rem 0 0;
  max-width: 26rem;
  color: #C9CFC9;
  font-size: 1rem;
}

.co-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.co-brand-light .co-mark {
  color: var(--co-letter);
}

.co-footer-links {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
}

/* Narrow screens */

@media (max-width: 900px) {
  .co-hero-grid,
  .co-pilot-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }

  .co-board {
    justify-self: start;
  }

  .co-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .co-promises {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }
}

@media (max-width: 640px) {
  .co {
    font-size: 1.0625rem;
  }

  .co-nav a:not(.co-button) {
    display: none;
  }

  .co-hero {
    padding-block: 1.5rem 3rem;
  }

  .co-lead {
    font-size: 1.15rem;
  }

  .co-section {
    padding-block: 3.25rem;
  }

  .co-floors,
  .co-steps,
  .co-field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .co-form-card {
    padding: 1.35rem;
  }

  .co-board-felt {
    padding-inline: 1.1rem;
    letter-spacing: 0.1em;
  }
}
