/* madridaibuilders.com: 2026-10 redesign
   Ink navy + Madrid red + warm cream. Bricolage Grotesque display, Inter body
   (shared with mattffrench.com and madrilingo.com), IBM Plex Mono labels. */

:root {
  --bg: #f7f2ea;
  --surface: #fffdf9;
  --ink: #141625;
  --muted: #5d6070;
  --line: #e6ddcf;
  --accent: #d9442b;
  --accent-ink: #ffffff;
  --accent-soft: #fbe6df;
  --dark: #10121f;
  --dark-2: #191c2e;
  --dark-ink: #f4efe6;
  --dark-muted: #a9abbd;
  --dark-line: #2a2e45;
  --hot: #ff6a4d;
  --sun: #f5b841;
  --display: "Sora", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --max: 1160px;
  --gutter: 16px;
  --radius: 18px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e18;
    --surface: #151829;
    --ink: #f1ece3;
    --muted: #a3a6b8;
    --line: #262a40;
    --accent: #ff6a4d;
    --accent-ink: #10121f;
    --accent-soft: #2b1a1c;
    --dark: #080a12;
    --dark-2: #12152a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--gutter); top: var(--gutter); background: var(--surface); color: var(--ink); padding: 8px 12px; z-index: 30; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; margin: 0; }
h1 { font-size: clamp(42px, 7.6vw, 84px); line-height: .98; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.04; text-wrap: balance; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.label { font: 500 12.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; display: inline-flex; gap: 10px; align-items: center; }
.label::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px; border-radius: 999px; font: 600 16px/1 var(--body); text-decoration: none; border: 1.5px solid currentColor; transition: transform .15s ease, background .15s ease, color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { color: var(--ink); }
.dark .btn.primary { background: var(--hot); border-color: var(--hot); color: #10121f; }
.dark .btn.primary:hover { background: var(--dark-ink); border-color: var(--dark-ink); }
.dark .btn.ghost { color: var(--dark-ink); border-color: rgba(244,239,230,.35); }
.dark .btn.ghost:hover { border-color: var(--dark-ink); }

/* Dark band (header + hero, CTA, footer) */
.dark { background: var(--dark); color: var(--dark-ink); }
.dark .label { color: var(--hot); }
.dark a:not(.btn) { color: var(--dark-ink); }

.site-header { position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 18px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.brand svg { width: 32px; height: 32px; flex: none; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--dark-muted) !important; }
.nav a:hover { color: var(--dark-ink) !important; }
.nav .pill { color: #10121f !important; background: var(--hot); padding: 9px 16px; border-radius: 999px; font-weight: 600; }
.nav .pill:hover { background: var(--dark-ink); }
.nav .opt { display: none; }
@media (min-width: 820px) { .nav .opt { display: inline; } }

.hero-band { position: relative; overflow: hidden; }
.hero-band::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; background: radial-gradient(closest-side, rgba(255,106,77,.22), transparent 70%); pointer-events: none; }
.hero-band::after { content: ""; position: absolute; inset: auto auto -30% -20%; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; background: radial-gradient(closest-side, rgba(245,184,65,.10), transparent 70%); pointer-events: none; }
.hero { position: relative; z-index: 1; display: grid; gap: 40px; padding-top: 36px; padding-bottom: 56px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.25fr .75fr; gap: 64px; padding-top: 56px; padding-bottom: 80px; } }
.hero h1 em { font-style: normal; color: var(--hot); }
.hero .lead { font-size: clamp(18px, 2vw, 21px); color: var(--dark-muted); max-width: 36em; margin: 22px 0 30px; }
.founder { margin: 22px 0 0; color: var(--dark-muted); font-size: 15px; }
.founder a { font-weight: 600; }

.reel-frame { position: relative; justify-self: center; width: min(100%, 330px); aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; background: #000; border: 1px solid var(--dark-line); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), 0 0 0 8px rgba(255,255,255,.03); transform: rotate(1.5deg); }
.reel-frame video { width: 100%; height: 100%; object-fit: cover; }
.reel-tag { position: absolute; left: 14px; top: 14px; z-index: 2; font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: rgba(16,18,31,.78); color: var(--dark-ink); padding: 7px 10px; border-radius: 999px; pointer-events: none; display: inline-flex; align-items: center; gap: 7px; }
.reel-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hot); }

.stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--dark-line); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats > div { padding: 26px 0 30px; }
.stats > div + div { padding-left: 18px; }
.stats > div:nth-child(3) { padding-left: 0; }
@media (min-width: 760px) { .stats > div:nth-child(3) { padding-left: 18px; } .stats > div + div { border-left: 1px solid var(--dark-line); } }
@media (max-width: 759px) { .stats > div:nth-child(even) { border-left: 1px solid var(--dark-line); } .stats > div:nth-child(n+3) { border-top: 1px solid var(--dark-line); } }
.stats b { display: block; font: 700 clamp(34px, 4.6vw, 52px)/1 var(--display); letter-spacing: -0.03em; color: var(--dark-ink); }
.stats span { display: block; margin-top: 8px; color: var(--dark-muted); font-size: 14.5px; line-height: 1.4; }
.stats-note { position: relative; z-index: 1; font: 400 12px/1 var(--mono); color: var(--dark-muted); padding-bottom: 22px; margin: 0; opacity: .8; }

/* Sections */
section { padding: 72px 0; }
@media (min-width: 900px) { section { padding: 104px 0; } }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p:not(.label) { color: var(--muted); font-size: 18px; margin-top: 14px; }

/* Wide photo */
.wide-photo { padding: 0; }
.wide-photo figure { margin: 0; position: relative; }
.wide-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 760px) { .wide-photo img { aspect-ratio: 16 / 7; } }
.wide-photo figcaption { position: absolute; left: var(--gutter); bottom: 16px; font: 500 12px/1.3 var(--mono); letter-spacing: .04em; color: #fff; background: rgba(16,18,31,.72); padding: 7px 11px; border-radius: 999px; max-width: calc(100% - 2 * var(--gutter)); }

/* Formats */
.formats { display: grid; gap: 20px; }
@media (min-width: 820px) { .formats { grid-template-columns: 1fr 1fr; } }
.format { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; overflow: hidden; }
.format::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--accent); }
.format.alt::before { background: var(--sun); }
.format .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.format .num { font: 500 13px/1 var(--mono); color: var(--muted); }
.tag { font: 500 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.format h3 { font-size: clamp(26px, 3vw, 32px); }
.format .promise { font-weight: 600; margin: 10px 0 8px; }
.format p { color: var(--muted); }
.format dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 22px 0 0; padding-top: 20px; border-top: 1px dashed var(--line); font-size: 15.5px; }
.format dt { font: 500 12px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.format dd { margin: 0; }

/* Who comes */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.values { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 4px; }
.values li { display: grid; grid-template-columns: 52px 1fr; gap: 6px; padding: 18px 0; border-top: 1px solid var(--line); }
.values .n { font: 700 22px/1.1 var(--display); color: var(--accent); }
.values b { display: block; font-size: 18px; }
.values span:not(.n) { color: var(--muted); }
.quote-card { background: var(--dark); color: var(--dark-ink); border-radius: var(--radius); padding: 34px 30px; position: relative; overflow: hidden; }
.quote-card::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,106,77,.35), transparent); }
.quote-card p.big { font: 700 clamp(26px, 3.2vw, 36px)/1.12 var(--display); letter-spacing: -0.025em; margin: 0 0 18px; position: relative; }
.quote-card p.big em { font-style: normal; color: var(--hot); }
.quote-card p:not(.big) { color: var(--dark-muted); position: relative; margin: 0; }

/* Gallery */
.gallery-section { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-flow: dense; gap: 10px; }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.gallery figure { margin: 0; border-radius: 14px; overflow: hidden; background: var(--line); aspect-ratio: 1 / 1; }
.gallery figure.wide { grid-column: span 2; aspect-ratio: 2 / 1; }
@media (min-width: 760px) { .gallery figure.tall { grid-row: span 2; aspect-ratio: auto; } }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery-foot { margin-top: 22px; color: var(--muted); font-size: 15px; }

/* Get involved */
.involve { display: grid; gap: 16px; }
@media (min-width: 760px) { .involve { grid-template-columns: repeat(3, 1fr); } }
.involve.five { }
@media (min-width: 760px) { .involve.five { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .involve.five { grid-template-columns: repeat(3, 1fr); } }
.involve article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.involve .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.involve .ico svg { width: 22px; height: 22px; }
.involve h3 { margin-bottom: 8px; }
.involve p { color: var(--muted); margin: 0; }
.involve a { color: var(--accent); font-weight: 600; }

/* Connect / CTA band */
.cta-band { padding: 80px 0; }
@media (min-width: 900px) { .cta-band { padding: 112px 0; } }
.cta-grid { display: grid; gap: 36px; align-items: start; }
@media (min-width: 900px) { .cta-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; } }
.cta-band h2 { font-size: clamp(36px, 5.4vw, 64px); }
.cta-band .sub { color: var(--dark-muted); font-size: 18px; margin: 18px 0 0; max-width: 32em; }
.connect { display: grid; gap: 14px; }
.connect a.card { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; padding: 20px 22px; border-radius: var(--radius); background: var(--dark-2); border: 1px solid var(--dark-line); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.connect a.card:hover { border-color: var(--hot); transform: translateY(-2px); }
.connect .logo { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font: 700 18px/1 var(--display); }
.connect .logo.luma { background: #f4efe6; color: #10121f; }
.connect .logo.meetup { background: #f64060; color: #fff; }
.connect .logo.wa { background: #1f3b2e; color: #7fe0a8; }
.connect b { display: block; font-size: 17px; color: var(--dark-ink); }
.connect small { display: block; color: var(--dark-muted); font-size: 14px; line-height: 1.4; margin-top: 2px; }
.connect .go { font: 500 13px/1 var(--mono); color: var(--hot); white-space: nowrap; }
.connect .card.static { grid-template-columns: 48px 1fr; cursor: default; }
.connect div.card { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; padding: 20px 22px; border-radius: var(--radius); border: 1px dashed var(--dark-line); }

/* Partner strip */
.partner-strip { display: grid; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; }
@media (min-width: 820px) { .partner-strip { grid-template-columns: auto 1fr auto; gap: 36px; padding: 34px 36px; } }
.venue { display: flex; flex-direction: column; gap: 4px; padding-right: 10px; }
.venue .label { margin-bottom: 4px; }
.venue b { font: 700 26px/1.1 var(--display); letter-spacing: -0.02em; }
.venue span { color: var(--muted); font-size: 14.5px; }
.partner-strip p { margin: 0; color: var(--muted); }
@media (min-width: 820px) { .partner-strip p { border-left: 1px solid var(--line); padding-left: 36px; } }

/* Footer */
.site-footer { padding: 56px 0 32px; border-top: 1px solid var(--dark-line); }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.foot-grid p { color: var(--dark-muted); font-size: 15px; margin: 14px 0 0; max-width: 26em; }
.foot-grid h4 { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dark-muted); margin: 6px 0 14px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.foot-grid ul a { text-decoration: none; }
.foot-grid ul a:hover { text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--dark-line); color: var(--dark-muted); font-size: 13.5px; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; padding: 40px var(--gutter); text-align: center; position: relative; z-index: 1; }
.notfound p { color: var(--dark-muted); margin: 16px 0 28px; }
.notfound .actions { justify-content: center; }

.brand-logo{width:32px;height:32px;border-radius:8px;display:block}
