/* AffyNext public site. Brand matches the portals: Inter + Montserrat,
   teal #1a9faa, orange #f59a27, ink #0d1f26. */
:root {
  --teal: #1a9faa;
  --teal-dark: #156b76;
  --teal-soft: #e6f5f6;
  --orange: #f59a27;
  --orange-hover: #ffab3f;
  --orange-dark: #a85f06;
  --orange-soft: #fff1de;
  --ink: #0d1f26;
  --ink-2: #12303a;
  --text: #1f2f36;
  --muted: #53666e;
  --line: #dfe8ea;
  --bg: #ffffff;
  --bg-alt: #f5f9fa;
  --on-dark: #c6d8dc;
  --on-dark-muted: #9dbcc2;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: Montserrat, Inter, sans-serif; line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: var(--teal-dark); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; font-weight: 600; cursor: pointer;
  font-family: Montserrat, Inter, sans-serif; font-size: 15px; line-height: 1.2;
  padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: var(--orange-hover); }
.btn-teal { background: var(--teal-dark); color: #fff; }
.btn-teal:hover { background: #0f5761; }
.btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-sm { padding: 9px 14px; font-size: 14px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand img { height: 32px; width: auto; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--text); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--teal-dark); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* Dropdown (details/summary: works without JS, keyboard accessible) */
.dd { position: relative; }
.dd > summary { list-style: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary::after {
  content: ""; width: 7px; height: 7px; margin-left: 2px; margin-top: -3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .15s;
}
.dd[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.dd-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(13,31,38,.14); padding: 8px; margin: 0; list-style: none;
}
.dd-panel a {
  display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: 15px;
}
.dd-panel a span { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.dd-panel a:hover, .dd-panel a:focus-visible { background: var(--bg-alt); }

/* Hero */
.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(26,159,170,.38), transparent 60%),
    radial-gradient(600px 320px at 0% 110%, rgba(245,154,39,.16), transparent 60%),
    var(--ink);
  color: #fff; padding: 88px 0 96px;
}
.eyebrow {
  font-family: Montserrat, sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--orange);
}
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; margin: 16px 0 20px; max-width: 820px; }
.hero h1 span { color: var(--orange); }
.hero .lead { font-size: 18px; color: var(--on-dark); max-width: 660px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero .signin { margin-top: 20px; font-size: 15px; color: var(--on-dark-muted); }
.hero .signin a { color: #fff; text-decoration: none; border-bottom: 1px solid var(--teal); }
.hero .signin a:hover { color: var(--orange); border-color: var(--orange); }
.hero-points {
  display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 44px 0 0; padding: 0; list-style: none;
  color: var(--on-dark); font-size: 15px;
}
.hero-points li::before { content: "✓"; color: var(--orange); font-weight: 700; margin-right: 8px; }

/* Sections */
section { padding: 80px 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 700px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; color: var(--ink); margin-top: 10px; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 17px; }
.section-head .eyebrow { color: var(--teal-dark); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { font-size: 19px; font-weight: 700; color: var(--ink); }
.card p { color: var(--muted); margin-top: 10px; }

/* Audience split (advertisers / publishers) */
.audience { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.audience + .audience { margin-top: 0; }
.tag {
  display: inline-block; font-family: Montserrat, sans-serif; font-weight: 600;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px;
}
.tag-teal { background: var(--teal-soft); color: var(--teal-dark); }
.tag-orange { background: var(--orange-soft); color: var(--orange-dark); }
.audience h2 { font-size: clamp(26px, 3.4vw, 36px); color: var(--ink); margin: 14px 0 12px; }
.audience .intro { color: var(--muted); font-size: 17px; }
.audience .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.checks li {
  position: relative; padding: 16px 18px 16px 52px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px;
}
.checks li strong { display: block; color: var(--ink); font-weight: 600; }
.checks li span { color: var(--muted); font-size: 15px; }
.checks li::before {
  content: ""; position: absolute; left: 18px; top: 19px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--teal-soft);
}
.checks li::after {
  content: ""; position: absolute; left: 24px; top: 24px; width: 8px; height: 5px;
  border-left: 2px solid var(--teal-dark); border-bottom: 2px solid var(--teal-dark);
  transform: rotate(-45deg);
}
.checks.orange li::before { background: var(--orange-soft); }
.checks.orange li::after { border-color: var(--orange-dark); }

/* Steps */
.step .num {
  width: 42px; height: 42px; border-radius: 10px; background: var(--teal);
  color: #fff; font-family: Montserrat, sans-serif; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}

/* Pricing */
.price-card { padding: 34px; display: flex; flex-direction: column; }
.price-card .tag { align-self: flex-start; }
.price { font-family: Montserrat, sans-serif; font-weight: 800; color: var(--ink); font-size: 40px; margin-top: 16px; line-height: 1.1; }
.price small { font-size: 16px; font-weight: 600; color: var(--muted); }
.price-card ul { margin: 18px 0 26px; padding-left: 20px; color: var(--muted); }
.price-card li { margin-top: 6px; }
.price-card .btn { margin-top: auto; align-self: flex-start; }
.fine { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 54px 18px 22px; position: relative;
  font-weight: 600; color: var(--ink); font-size: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 400; color: var(--teal-dark);
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 22px 20px; color: var(--muted); }

/* Contact band */
.contact-band {
  background: var(--ink-2); color: #fff; border-radius: 20px; padding: 48px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
}
.contact-band h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
.contact-band p { color: var(--on-dark); margin-top: 12px; }
.contact-band a.mail { color: var(--orange); font-weight: 600; text-decoration: none; }
.contact-band a.mail:hover { text-decoration: underline; }
.contact-band .actions { display: flex; flex-direction: column; gap: 12px; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 56px 0 28px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.site-footer img { height: 30px; width: auto; }
.site-footer h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .about { margin-top: 14px; max-width: 320px; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; font-size: 14px; }

/* Simple text pages (privacy, terms, 404) */
.page-hero { background: var(--ink); color: #fff; padding: 56px 0; }
.page-hero h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; margin-top: 10px; }
.page-hero p { color: var(--on-dark); margin-top: 10px; }
.prose { max-width: 760px; color: var(--text); }
.prose h2 { font-size: 22px; color: var(--ink); margin: 34px 0 10px; }
.prose p + p, .prose ul + p { margin-top: 12px; }
.prose ul { padding-left: 22px; }
.notice {
  background: var(--orange-soft); border: 1px solid #f5d3a6; color: var(--orange-dark);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; font-size: 15px;
}

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .grid-2, .grid-3, .audience, .contact-band { grid-template-columns: 1fr; }
  .audience { gap: 28px; }
  .hero { padding: 60px 0 68px; }
  section { padding: 60px 0; }
  .contact-band { padding: 32px 24px; }
  .contact-band .actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { gap: 10px; }
  .brand img { height: 26px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-sm { padding: 8px 10px; font-size: 13px; }
  .dd-panel { position: fixed; left: 16px; right: 16px; top: 72px; min-width: 0; }
  .hero .actions .btn { width: 100%; }
  .foot-grid { grid-template-columns: 1fr; }
  .card, .price-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
