/* abittoomuch.gg: dark theme. Colours and fonts come only from brand-tokens.css.
   Approved text pairs (brand guide 5.3): Liitu/Yö 17.08, Kulta/Yö 10.34, Usva/Yö 7.87,
   Liitu/Hiili 13.81, Muste/Kulta 12.00, Liitu/Viini 9.55. 8 px grid, 1280 px content. */

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

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

body {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Reading sections stay left-aligned inside the 1280 px frame, as in the layout image. */
.reading > * {
  max-width: 68ch;
}

h1,
h2,
h3,
p {
  margin: 0 0 24px;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  margin-bottom: 32px;
}

h2 {
  font-size: clamp(32px, 4vw, 40px);
  line-height: 1.15;
  margin-bottom: 24px;
}

a {
  color: var(--abtm-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.logo-link {
  display: inline-block;
  line-height: 0;
}

/* Header: primary logo; the SVG carries its own protection area (brand guide 4.2). */
.site-header .container {
  padding-top: 24px;
  padding-bottom: 8px;
}

.logo {
  display: block;
  width: 232px;
  height: auto;
}

/* Hero: large scale, empty space, one open frame and one small gold square. */
.hero .container {
  padding-top: 32px;
  padding-bottom: 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.hero-lead {
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.4;
  max-width: 28em;
}

.hero-action {
  margin-top: 40px;
  margin-bottom: 0;
}

.hero-art {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.hero-frame {
  position: absolute;
  inset: 0;
  border: 16px solid var(--abtm-gold);
  border-radius: 56px;
}

/* The opening: a block in the background colour over the top-right corner of the frame. */
.hero-frame::after {
  content: "";
  position: absolute;
  top: -16px;
  right: -16px;
  width: 96px;
  height: 64px;
  background: var(--abtm-night);
}

.hero-bit {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--abtm-gold);
}

@keyframes hero-enter {
  from {
    transform: translateY(16px);
  }

  to {
    transform: translateY(0);
  }
}

.hero-frame.brand-motion {
  animation: hero-enter 240ms ease-out both;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 64px;
  }

  .hero-art {
    width: min(100%, 400px);
    margin: 0 0 0 auto;
  }

  .hero .container {
    padding-top: 48px;
    padding-bottom: 96px;
  }
}

/* Sections */
.section .container {
  padding-top: 48px;
  padding-bottom: 48px;
}

@media (min-width: 900px) {
  .section .container {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

/* Buttons: Kulta with Muste text (brand guide 5.4, gg dark). */
.button,
a.button {
  display: inline-block;
  font: 600 16px/1.35 "Inter", system-ui, sans-serif;
  color: var(--abtm-ink);
  background: var(--abtm-gold);
  border: 0;
  border-radius: 8px;
  padding: 16px 32px;
  min-height: 48px;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--abtm-paper);
}

.button:disabled {
  cursor: default;
}

/* Card: Hiili surface with Liitu text; radius 16 px. */
.card {
  background: var(--abtm-charcoal);
  color: var(--abtm-paper);
  border-radius: 16px;
  padding: 32px 24px;
}

.card a {
  color: var(--abtm-paper);
}

@media (min-width: 600px) {
  .card {
    padding: 40px;
  }
}

.field {
  margin-bottom: 24px;
}

label {
  display: block;
  font: 500 16px/1.35 "Inter", system-ui, sans-serif;
  margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
textarea {
  display: block;
  width: 100%;
  font: 400 18px/1.5 "Inter", system-ui, sans-serif;
  color: var(--abtm-paper);
  background: var(--abtm-night);
  border: 2px solid var(--abtm-mist);
  border-radius: 8px;
  padding: 12px 16px;
  min-height: 48px;
}

textarea {
  resize: vertical;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--abtm-gold);
  border-width: 3px;
}

/* Error texts: Liitu on Viini (brand guide 5.3). */
.field-error {
  margin: 8px 0 0;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--abtm-paper);
  background: var(--abtm-wine);
}

.consent {
  font-size: 16px;
}

.actions {
  margin-bottom: 0;
}

.form-status {
  margin: 24px 0 0;
  padding: 16px;
  border-radius: 8px;
  font-weight: 600;
  background: var(--abtm-night);
  border-left: 8px solid var(--abtm-gold);
}

.form-status.is-error {
  color: var(--abtm-paper);
  background: var(--abtm-wine);
  border-left-color: var(--abtm-paper);
}

[hidden] {
  display: none !important;
}

/* Footer: Usva text on Yö, gold links. */
.site-footer {
  border-top: 2px solid var(--abtm-charcoal);
  color: var(--abtm-mist);
  font-size: 16px;
}

.site-footer .container {
  padding-top: 32px;
  padding-bottom: 40px;
}

.site-footer p {
  margin-bottom: 8px;
}
