/* =========================================
   ainorge.no — Skifer design system
   Philosophy: Nordisk enkelhet. Rolig autoritet.
   ========================================= */

/* --- Tokens: Skifer-palett --- */
:root {
  --bg:           #F5F5F7;
  --surface:      #EAEAEC;
  --text:         #1D1D1F;
  --muted:        #6E6E73;
  --accent:       #30435C;
  --accent-mid:   #3D5572;
  --border:       #D5D5DA;

  --font-body: 'Inter', system-ui, sans-serif;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:    cubic-bezier(0.4, 0, 0.2, 1);

  --radius: 4px;
  --max-w: 640px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

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

a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================
   LAYOUT
   ========================================= */
.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* =========================================
   HEADER — logo: «ai» Black + «norge» Light
   ========================================= */
.site-header {
  padding: 36px 0 0;
}

.site-header .container {
  display: flex;
  align-items: center;
}

.wordmark {
  display: flex;
  align-items: baseline;
  line-height: 1;
  letter-spacing: -0.05em;
  font-family: var(--font-body);
  font-size: 1.375rem;
  text-decoration: none;
  animation: fadeUp 0.5s var(--ease-spring) both;
  user-select: none;
}

.wordmark__ai {
  font-weight: 900;
  color: var(--accent);
}

.wordmark__norge {
  font-weight: 300;
  color: var(--text);
}

.wordmark__tld {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.7em;
  letter-spacing: -0.03em;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  display: flex;
  align-items: center;
  padding: 96px 0 80px;
}

@media (min-width: 768px) {
  .hero {
    padding: 120px 0 100px;
    min-height: calc(100vh - 100px - 80px);
  }
}

.hero__inner {
  width: 100%;
}

.hero__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  animation: fadeUp 0.5s var(--ease-spring) 0.05s both;
}

.hero__status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

.hero__status-text {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.hero__h1 {
  font-family: var(--font-body);
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 24px;
  animation: fadeUp 0.6s var(--ease-spring) 0.1s both;
}

.hero__h1 strong {
  font-weight: 900;
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--muted);
  max-width: 44ch;
  margin-bottom: 48px;
  animation: fadeUp 0.6s var(--ease-spring) 0.15s both;
}

/* =========================================
   FORM med GDPR
   ========================================= */
.signup-block {
  animation: fadeUp 0.6s var(--ease-spring) 0.2s both;
}

.form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.form-row input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  transition: border-color 200ms var(--ease-out),
              box-shadow  200ms var(--ease-out);
  -webkit-appearance: none;
}

.form-row input[type="email"]::placeholder {
  color: #A1A1A6;
}

.form-row input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(48, 67, 92, 0.1);
}

.form-row button[type="submit"] {
  padding: 13px 22px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms var(--ease-out);
}

.form-row button[type="submit"]:hover {
  background: var(--accent);
}

.form-row button[type="submit"]:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
}

.form-consent input[type="checkbox"] {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-consent__text {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

.signup-note {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

.form-error {
  font-size: 0.8125rem;
  color: #C0392B;
  margin-bottom: 8px;
  display: none;
}
.form-error.visible { display: block; }

/* =========================================
   TEASER GRID
   ========================================= */
.teaser {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .teaser { padding: 100px 0; }
}

.teaser__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 48px;
}

.teaser__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

@media (min-width: 560px) {
  .teaser__grid { grid-template-columns: repeat(3, 1fr); }
}

.teaser-item {
  background: var(--bg);
  padding: 28px 24px;
  transition: background 200ms var(--ease-out);
}

.teaser-item:hover {
  background: var(--surface);
}

.teaser-item__number {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.04em;
  transition: color 200ms var(--ease-out);
}

.teaser-item:hover .teaser-item__number {
  color: var(--accent);
}

.teaser-item__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.teaser-item__text {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* =========================================
   ABOUT
   ========================================= */
.about {
  padding: 80px 0 100px;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .about { padding: 100px 0 120px; }
}

.about__text {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 46ch;
}

.about__text a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 150ms;
}

.about__text a:hover {
  color: var(--accent);
}

.about__text p + p {
  margin-top: 16px;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.footer__left,
.footer__right {
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer__right a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.footer__right a:hover {
  color: var(--text);
}

/* =========================================
   TAKK / 404
   ========================================= */
.page-center {
  min-height: calc(100vh - 100px - 80px);
  display: flex;
  align-items: center;
  padding: 80px 0;
}

.page-center__inner {
  max-width: 42ch;
}

.page-center__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.page-center__h1 {
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 16px;
}

.page-center__text {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.page-center__text a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 150ms var(--ease-out);
}

.btn-back:hover {
  background: var(--accent);
}

.page-404__number {
  font-family: var(--font-body);
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--border);
  margin-bottom: 16px;
}

/* =========================================
   FADE-IN (intersection observer)
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease-spring),
              transform 0.55s var(--ease-spring);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   CTA BRIDGE
   ========================================= */
.cta-bridge {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}
.cta-bridge__text {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.cta-bridge__link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 1px;
  transition: opacity 0.15s;
}
.cta-bridge__link:hover { opacity: 0.65; }

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   MOBILE
   ========================================= */
@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .form-row { flex-direction: column; }
  .form-row button[type="submit"] { width: 100%; }
  .hero { padding: 72px 0 64px; }
}
