/* dedi.ie marketing site — production-quality styles.
 *
 * Design system (one type scale, one spacing scale, one palette).
 * Components reference design tokens — no raw hex outside :root or
 * the SVG favicon/OG image. A dark mode is provided via
 * `prefers-color-scheme`. Focus rings are visible. WCAG AA contrast
 * is met against the page background for every text colour.
 *
 * Files served from /css/style.css on every marketing page. */

:root {
  /* colour — single source of truth */
  --bg:           #fdfaf6;
  --bg-elev:     #ffffff;
  --bg-band:      #f3ede0;
  --fg:           #1a1a1a;
  --muted:        #5b5b5b;
  --line:         #e2dccf;
  --accent:       #d4691a;
  --accent-dark:  #b85a14;
  --accent-soft:  #f3ede0;
  --code-bg:      #f3ede0;
  --code-fg:      #1a1a1a;
  --link:         #b85a14;
  --focus:        #d4691a;

  /* type scale (one scale) */
  --t-xs:    13px;
  --t-sm:    14px;
  --t-base:  16px;
  --t-md:    18px;
  --t-lg:    22px;
  --t-xl:    28px;
  --t-2xl:   40px;

  /* spacing scale (4px increments) */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;

  /* layout */
  --max:   920px;
  --radius: 4px;
  --radius-lg: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #1a1714;
    --bg-elev:     #221e1a;
    --bg-band:      #2a2520;
    --fg:           #f1ece4;
    --muted:        #b6ada1;
    --line:         #3a342d;
    --accent:       #e4803a;
    --accent-dark:  #d4691a;
    --accent-soft:  #2a2520;
    --code-bg:      #2a2520;
    --code-fg:      #f1ece4;
    --link:         #e4803a;
    --focus:        #e4803a;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

/* layout */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.brand {
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.brand span { color: var(--accent); }

header nav a {
  margin-left: var(--s-5);
  color: var(--fg);
  font-size: var(--t-sm);
}

header nav a.cta {
  background: var(--accent);
  color: #fff;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius);
}

header nav a.cta:hover { background: var(--accent-dark); text-decoration: none; }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s-8) var(--s-6);
}

section { margin-bottom: var(--s-8); }

h1 {
  font-size: var(--t-2xl);
  line-height: 1.1;
  margin: 0 0 var(--s-4);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--t-lg);
  margin: 0 0 var(--s-5);
}

h3 {
  font-size: var(--t-sm);
  margin: 0 0 var(--s-2);
}

p { margin: 0 0 var(--s-4); }

/* hero */
.hero p {
  font-size: var(--t-md);
  color: var(--muted);
  margin: 0 0 var(--s-5);
  max-width: 60ch;
}

.hero-actions { margin-top: var(--s-5); }

.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--t-base);
}

.cta:hover { background: var(--accent-dark); text-decoration: none; }

.cta-secondary {
  display: inline-block;
  margin-left: var(--s-3);
  padding: var(--s-3) var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg);
  font-weight: 600;
  font-size: var(--t-base);
}

.cta-secondary:hover { border-color: var(--fg); text-decoration: none; }

/* grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-5);
}

.grid > div {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  background: var(--bg-elev);
}

.grid.tiers p {
  margin: 0;
  color: var(--muted);
  font-size: var(--t-sm);
}

.grid p { margin: 0; color: var(--muted); font-size: var(--t-sm); }

/* list */
.features-list,
.steps {
  padding-left: var(--s-5);
  margin: 0;
}

.features-list li,
.steps li { margin-bottom: var(--s-2); }

.steps li::marker { color: var(--accent); font-weight: 700; }

/* pricing table */
.pricing { overflow-x: auto; }

.pricing table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
}

.pricing th,
.pricing td {
  text-align: left;
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.pricing th { background: var(--code-bg); font-weight: 600; }

.pricing .num,
.pricing th.num { text-align: right; }

.table-caption {
  margin-top: var(--s-4);
  color: var(--muted);
  font-size: var(--t-xs);
}

.see-also {
  margin-top: var(--s-5);
  font-size: var(--t-sm);
}

/* code */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

/* CTA band */
.cta-band {
  background: var(--bg-band);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  text-align: center;
}

.cta-band h2 { margin-top: 0; }
.cta-band p { color: var(--muted); max-width: 60ch; margin: 0 auto var(--s-5); }

/* contact form */
.contact-form {
  display: grid;
  gap: var(--s-3);
  max-width: 480px;
}

.contact-form label {
  display: block;
  font-size: var(--t-sm);
  color: var(--muted);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--t-base);
  font-family: inherit;
  background: var(--bg-elev);
  color: var(--fg);
}

.contact-form textarea { resize: vertical; }

.contact-form button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--t-base);
  cursor: pointer;
  justify-self: start;
}

.contact-form button:hover { background: var(--accent-dark); }

.muted { color: var(--muted); font-size: var(--t-xs); }

/* footer */
footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-6);
  padding: var(--s-6);
  border-top: 1px solid var(--line);
  max-width: var(--max);
  margin: 0 auto;
}

footer strong { display: block; margin-bottom: var(--s-2); }
footer p { margin: 0; color: var(--muted); font-size: var(--t-sm); }
footer a { display: block; color: var(--fg); margin-bottom: var(--s-1); font-size: var(--t-sm); }

/* responsive — small screens */
@media (max-width: 720px) {
  header { flex-wrap: wrap; gap: var(--s-3); }
  header nav { width: 100%; }
  header nav a { margin-left: 0; margin-right: var(--s-4); }
  main { padding: var(--s-6) var(--s-4); }
  h1 { font-size: 30px; }
  footer { grid-template-columns: 1fr 1fr; gap: var(--s-5); padding: var(--s-5); }
  .cta-secondary { margin-left: 0; margin-top: var(--s-3); }
}

@media (max-width: 420px) {
  footer { grid-template-columns: 1fr; }
  .hero-actions { display: flex; flex-direction: column; gap: var(--s-3); }
  .cta-secondary { margin-left: 0; }
}