/* Shared styles for every page: fonts, colours, buttons, fields, tags and focus.
   Design system "Studio" (2026 redesign): calm white and soft grey surfaces,
   near-black ink for text and main buttons, the brand teal as the accent. */

/* Inter (open font licence, stored here) is the fallback when the visitor's
   own system font isn't available. Nothing is loaded from other servers. */
@font-face {
  font-family: "Inter Local";
  src: url("../assets/fonts/ad-fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter Local";
  src: url("../assets/fonts/ad-fonts/inter-700.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  /* Ink and surfaces */
  --ink: #0b1215; /* text and main buttons */
  --ink-soft: #55616a; /* secondary text (6.4:1 on white) */
  --ink-muted: #66717a; /* hints and captions (5:1 on white, 4.6:1 on the grey surface) */
  --paper: #ffffff;
  --surface: #f6f7f8; /* page background inside the tools */
  --surface-2: #eef0f2; /* wells, tracks and pressed states */
  --artboard: #f3f5f6; /* behind the ad previews */
  --hairline: #e3e6e9; /* borders and rules */
  --hairline-strong: #cfd4d8;

  /* Brand */
  --brand: #0a9e8e; /* teal: logo, progress, focus, selected states */
  --brand-strong: #087f73; /* teal text and links (passes contrast) */
  --brand-deep: #066a60;
  --brand-tint: #e5f5f2; /* selected and "Free" backgrounds */
  --pro: #ffb020; /* amber: Pro */
  --pro-tint: #fff3dc;
  --pro-text: #845400;
  --caution: #9a5b00; /* warnings */
  --danger: #b42318;
  --crop: var(--brand); /* the original accent name, kept for crop marks */

  /* Type: the visitor's own system font first (San Francisco on Apple,
     Segoe on Windows), which is sharp and has every weight. */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", "Inter Local", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", "Inter Local", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, Consolas, monospace;

  /* Shape and depth */
  --radius: 10px; /* fields and buttons */
  --radius-small: 6px;
  --radius-large: 16px; /* panels */
  --shadow-sm: 0 1px 2px rgba(11, 18, 21, 0.05);
  --shadow-md: 0 1px 2px rgba(11, 18, 21, 0.04), 0 8px 24px rgba(11, 18, 21, 0.06);
  --shadow-lg: 0 24px 64px rgba(11, 18, 21, 0.18);
  --shadow-hover: 0 1px 2px rgba(11, 18, 21, 0.04), 0 10px 28px rgba(11, 18, 21, 0.09);
  --ring: 0 0 0 4px rgba(10, 158, 142, 0.18);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h1 {
  letter-spacing: -0.03em;
}

a {
  color: inherit;
}

::selection {
  background: rgba(10, 158, 142, 0.22);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Anything marked hidden stays hidden, whatever its layout styles say */
[hidden] {
  display: none !important;
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons: black for the main action, white with a border for the rest */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  font: 560 15px/1 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 2px rgba(11, 18, 21, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-primary:hover:not(:disabled) {
  border-color: #26323a;
  background: #26323a;
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--ink-muted);
  background: var(--surface);
}

.btn-brand {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: var(--paper);
}

.btn-brand:hover:not(:disabled) {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
}

.btn-large {
  min-height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 16px;
}

.btn-small {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
}

.btn .arrow {
  transition: transform 0.15s;
}

.btn:hover .arrow {
  transform: translateX(2px);
}

/* Form fields share one calm look everywhere */
input[type="text"],
input[type="url"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="search"],
select,
textarea {
  font-family: var(--font-sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  border-color: var(--brand) !important;
  outline: none;
  box-shadow: var(--ring);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--ink);
}

/* Wordmark: crop marks around a frame */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark svg {
  width: 22px;
  height: 22px;
  flex: none;
}

/* The logo (brand/logo): icon and lower-case wordmark, from the SVG files */
.wordmark-logo {
  display: block;
  flex: none;
  width: auto;
  height: 26px;
}

/* The product name sits after the AdTechKit company name, split by a thin rule */
.wordmark .product {
  padding-left: 10px;
  border-left: 1px solid var(--hairline-strong);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.wordmark span {
  white-space: nowrap;
}

/* Phones: the product name sits under the company name */
@media (max-width: 480px) {
  .wordmark {
    display: grid;
    grid-template-columns: 22px auto;
    column-gap: 8px;
    line-height: 1.2;
  }

  .wordmark svg {
    grid-row: span 2;
  }

  .wordmark:has(.wordmark-logo) {
    grid-template-columns: auto;
    row-gap: 4px;
  }

  .wordmark-logo {
    height: 20px;
  }

  .wordmark .product {
    padding-left: 0;
    border-left: 0;
    font-size: 13px;
  }
}

/* Small labels such as "Free" and "Pro" */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.4;
  color: var(--ink-soft);
  background: var(--paper);
  white-space: nowrap;
}

.tag-free {
  border-color: var(--brand-tint);
  background: var(--brand-tint);
  color: var(--brand-deep); /* the darker teal keeps small text readable on the tint */
}

.tag-pro {
  border-color: var(--pro-tint);
  background: var(--pro-tint);
  color: var(--pro-text);
}

.tag svg {
  width: 11px;
  height: 11px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
