/* Agmara — trading desk site. Typography-led, no stock photography. */

:root {
  --ink:        #12181d;
  --ink-soft:   #3c464f;
  --muted:      #6a747d;
  --paper:      #fbfaf7;
  --surface:    #ffffff;
  --surface-2:  #f4f2ec;
  --line:       #e3dfd6;
  --line-soft:  #eeebe4;
  --accent:     #1d6b57;
  --accent-ink: #14513f;
  --ochre:      #a8722a;
  --shadow:     0 1px 2px rgba(18,24,29,.05), 0 8px 24px -12px rgba(18,24,29,.18);
  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:       #eef1f2;
    --ink-soft:  #c2cace;
    --muted:     #8d979e;
    --paper:     #0e1317;
    --surface:   #151b20;
    --surface-2: #1b2228;
    --line:      #2a333a;
    --line-soft: #222a31;
    --accent:    #5cbfa1;
    --accent-ink:#8ad6bd;
    --ochre:     #d3a05c;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --ink:#eef1f2; --ink-soft:#c2cace; --muted:#8d979e;
  --paper:#0e1317; --surface:#151b20; --surface-2:#1b2228;
  --line:#2a333a; --line-soft:#222a31;
  --accent:#5cbfa1; --accent-ink:#8ad6bd; --ochre:#d3a05c;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 2rem); } }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand__name {
  font-family: var(--sans); font-weight: 600; font-size: 1.02rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
}
.brand__tag {
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); border-left: 1px solid var(--line); padding-left: .6rem; margin-left: .1rem;
}
@media (max-width: 560px) { .brand__tag { display: none; } }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a {
  text-decoration: none; font-size: .9rem; color: var(--ink-soft);
  padding: .35rem 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 760px) { .nav { gap: 1rem; } .nav a { font-size: .82rem; } }
@media (max-width: 480px) { .nav .nav--hide-sm { display: none; } }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.14; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.16rem; font-family: var(--sans); font-weight: 600; letter-spacing: -.005em; line-height: 1.35; }
p { margin: 0 0 1rem; max-width: var(--measure); }
.lede { font-size: 1.12rem; color: var(--ink-soft); }
.eyebrow {
  font-size: .7rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ochre); margin: 0 0 .9rem;
}
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- sections ---------- */
section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
section + section { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line-soft); }
.hero__grid { display: grid; grid-template-columns: 1.35fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 1.25rem; }
.hero .lede { font-size: 1.2rem; max-width: 54ch; }
.hero__rule { width: 56px; height: 2px; background: var(--accent); margin: 0 0 1.6rem; }

.factcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 3px; padding: 1.5rem 1.6rem; box-shadow: var(--shadow);
}
.factcard h3 { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 1.1rem; }
.factrow { display: flex; justify-content: space-between; gap: 1rem; padding: .62rem 0; border-top: 1px solid var(--line-soft); font-size: .9rem; }
.factrow:first-of-type { border-top: 0; padding-top: 0; }
.factrow dt { color: var(--muted); margin: 0; }
.factrow dd { margin: 0; text-align: right; color: var(--ink); font-weight: 500; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .92rem; font-weight: 500; text-decoration: none;
  padding: .68rem 1.25rem; border-radius: 2px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn--primary, :root:not([data-theme="light"]) .btn--primary { color: #0e1317; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .btn--primary { color: #fff; } }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid--2, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 3px; padding: 1.6rem 1.5rem;
}
.card h3 { margin-bottom: .55rem; }
.card p { font-size: .93rem; color: var(--ink-soft); margin-bottom: 0; }
.card__no {
  font-family: var(--mono); font-size: .72rem; color: var(--ochre);
  letter-spacing: .1em; display: block; margin-bottom: .9rem;
}

.linelist { list-style: none; margin: 0; padding: 0; }
.linelist li { padding: .95rem 0; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: 190px 1fr; gap: 1.5rem; }
.linelist li:first-child { border-top: 1px solid var(--line); }
.linelist strong { font-weight: 600; font-size: .95rem; }
.linelist span { color: var(--ink-soft); font-size: .93rem; }
@media (max-width: 700px) { .linelist li { grid-template-columns: 1fr; gap: .3rem; } }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .89rem; }
caption { text-align: left; padding: 1rem 1.15rem; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line); }
th, td { text-align: left; padding: .72rem 1.15rem; border-top: 1px solid var(--line-soft); vertical-align: top; }
thead th {
  border-top: 0; background: var(--surface-2); font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
td.num, td.f { font-family: var(--mono); font-size: .82rem; white-space: nowrap; }
.tablenote { font-size: .83rem; color: var(--muted); margin: .85rem 0 0; max-width: var(--measure); }

/* ---------- callout ---------- */
.callout {
  border-left: 2px solid var(--accent); background: var(--surface);
  padding: 1.3rem 1.5rem; border-radius: 0 3px 3px 0;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- checklist ---------- */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: .7rem; align-items: start; font-size: .95rem; color: var(--ink-soft); }
.checks li::before {
  content: ""; width: 7px; height: 7px; margin-top: .52rem; margin-left: 6px;
  background: var(--accent); border-radius: 50%; display: block;
}

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); background: var(--surface-2); padding: 3.5rem 0 2.5rem; margin-top: 0; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; gap: 2rem; } }
.foot h4 { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .55rem; font-size: .9rem; }
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot p { font-size: .9rem; color: var(--ink-soft); }
.colophon {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .8rem; color: var(--muted);
}
a.mail { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
a.mail:hover { border-bottom-color: var(--accent); }
