/* Self-hosted variable fonts (SIL Open Font License, via Fontsource) */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("fonts/newsreader-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("fonts/newsreader-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-display: swap; font-weight: 200 800; src: url("fonts/newsreader-latin-ext-wght-italic.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-display: swap; font-weight: 200 800; src: url("fonts/newsreader-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Trtex — clean but warm. Cobalt + lime from the Instagram identity, saffron for the stitched seam. */
:root {
  --paper: #FFFEFB;
  --linen: #F1F2EA;
  --ink: #1E2230;
  --muted: #555B6B;
  --indigo: #2B44C6;
  --indigo-dark: #1F3299;
  --lime: #D9EE5A;
  --saffron: #EF7B2C;
  --saffron-dark: #BC4D08;
  --rule: #DADBD2;
  --head: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Newsreader", Georgia, "Times New Roman", serif;
  --wrap: 1160px;
  --narrow: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--indigo); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--indigo-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.3rem; letter-spacing: 0; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: var(--narrow); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 5; background: rgba(255, 254, 251, 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.logo-ring { width: 32px; height: 32px; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav a, .lang, .mnav summary { font-family: var(--head); font-size: 0.95rem; color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--indigo); text-decoration: underline; }
.nav li:last-child a { background: var(--indigo); color: #fff; border-radius: 999px; padding: 7px 18px; font-weight: 600; }
.nav li:last-child a:hover { background: var(--indigo-dark); color: #fff; text-decoration: none; }
.lang { border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.lang:hover { background: var(--ink); color: var(--paper); }
.mnav { display: none; position: relative; }
.mnav summary { cursor: pointer; list-style: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px 12px; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav ul { position: absolute; right: 0; top: 44px; list-style: none; margin: 0; padding: 10px 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; min-width: 220px; box-shadow: 0 10px 30px rgba(30, 34, 48, 0.12); }
.mnav li a { display: block; padding: 8px 18px; font-family: var(--head); color: var(--ink); text-decoration: none; }
.mnav li a:hover { background: var(--linen); }

@media (max-width: 1020px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .mnav { display: block; }
}

/* ---------- shared ---------- */
.section { padding: 104px 0; }
.band { background: var(--linen); }
.sec-head { max-width: 720px; margin-bottom: 48px; }
.sec-head p { color: var(--muted); font-size: 1.2rem; }
.sec-cta { margin-top: 40px; }
.lead { font-size: 1.32rem; line-height: 1.55; color: var(--ink); }
.small { font-size: 1rem; }
.mini { font-size: 1.05rem; margin-top: 2em; }
.meta { font-family: var(--head); font-size: 0.95rem; color: var(--muted); margin-bottom: 0.6em; }
.more { font-family: var(--head); font-size: 0.98rem; font-weight: 600; }

.btn { display: inline-block; font-family: var(--head); font-weight: 600; font-size: 1.02rem; background: var(--indigo); color: #fff; border: 2px solid var(--indigo); border-radius: 999px; padding: 12px 24px; text-decoration: none; }
.btn:hover { background: var(--indigo-dark); border-color: var(--indigo-dark); color: #fff; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

.photo { margin: 0; }
.photo img { width: 100%; height: auto; object-fit: cover; border-radius: 14px; }
.photo figcaption { font-family: var(--head); font-size: 0.88rem; color: var(--muted); margin-top: 8px; }
.photo.slot { border: 2px dashed #B9BCB0; border-radius: 14px; background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(30, 34, 48, 0.03) 14px 28px); display: grid; place-items: center; min-height: 240px; padding: 24px; text-align: center; }
.photo.slot div { max-width: 280px; min-width: 0; }
.photo.slot strong { display: block; font-family: var(--head); font-size: 0.95rem; color: var(--ink); }
.photo.slot span { font-family: var(--head); font-size: 0.9rem; color: var(--muted); }

.inline-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.inline-list li { font-family: var(--head); font-size: 0.88rem; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 12px; background: var(--paper); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 96px; }
.hero-in { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 64px; align-items: center; }
.kicker { font-family: var(--head); font-weight: 600; font-size: 1.05rem; display: inline-block; background: var(--lime); padding: 4px 12px; border-radius: 6px; margin-bottom: 24px; }
.hero h1 { max-width: 11em; }
.hero .lead { max-width: 34em; margin-top: 8px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 40px; }
.hero-photo { position: relative; isolation: isolate; }
.hero-photo::before { content: ""; position: absolute; z-index: -1; top: -26px; right: -30px; width: 150px; height: 150px; border-radius: 50%;
  border: 12px solid var(--indigo); box-shadow: 0 0 0 12px var(--lime), 0 0 0 24px #E9A0C8, 0 0 0 36px var(--saffron); transform: scale(0.8); transform-origin: top right; }
.hero-photo .portrait img { aspect-ratio: 3 / 4; border-radius: 200px 200px 16px 16px; }
.caption { font-family: var(--head); font-size: 0.92rem; color: var(--muted); margin-top: 12px; }

/* ---------- mission ---------- */
.mission { padding: 88px 0; }
.mission-body { font-size: 1.4rem; line-height: 1.55; max-width: 36em; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.value { border-top: 3px solid var(--ink); padding-top: 16px; }
.value:nth-child(1) { border-color: var(--saffron); }
.value:nth-child(2) { border-color: var(--indigo); }
.value:nth-child(3) { border-color: #9DB21F; }
.value p { font-size: 1.05rem; color: var(--muted); }

/* ---------- founder ---------- */
.founder-in { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }
.founder-photos { display: grid; gap: 20px; position: sticky; top: 100px; }
.founder-photos .photo img { aspect-ratio: 3 / 2; }
.founder-photos .slot { aspect-ratio: 3 / 2; min-height: 0; }
.prose p { max-width: 36em; }
.signature { font-family: var(--body); font-style: italic; font-size: 1.6rem; margin-top: 0.6em; }

/* ---------- services ---------- */
.services { border-top: 1px solid var(--ink); }
.service { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--rule); }
.services { counter-reset: svc; }
.service { counter-increment: svc; }
.service h3 { font-size: 1.45rem; }
.service h3::before { content: counter(svc, decimal-leading-zero); display: block; font-size: 0.9rem; font-weight: 600; color: var(--indigo); letter-spacing: 0.04em; margin-bottom: 8px; }
.service p { margin: 0; }
.service dl { margin: 0; font-size: 0.98rem; }
.service dt { font-family: var(--head); font-weight: 600; font-size: 0.88rem; color: var(--muted); }
.service dd { margin: 0 0 12px; }

/* ---------- trainings ---------- */
.trainings { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.training { display: grid; grid-template-columns: 1fr 230px; gap: 32px; background: var(--paper); border: 2px solid transparent; border-radius: 14px; padding: 24px 28px; }
.training:has(.s-open) { border-color: var(--saffron-dark); box-shadow: 0 10px 28px rgba(188, 77, 8, 0.12); }
.training h3 { margin-bottom: 0.3em; }
.training p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.training-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-family: var(--head); font-size: 0.92rem; }
.status { border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.s-open { background: var(--saffron-dark); color: #fff; }
.s-soon { background: var(--lime); }
.s-request { border: 1.5px solid var(--ink); }
.s-inhouse { background: var(--indigo); color: #fff; }
.format { color: var(--muted); }
.past { max-width: 760px; margin-top: 64px; }
.past-list { list-style: none; padding: 0; margin: 0; }
.past-list li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.past-list strong { display: block; font-family: var(--head); font-weight: 600; }
.past-list span { font-size: 1rem; color: var(--muted); }

/* ---------- case studies ---------- */
.cases { display: grid; gap: 72px; }
.case { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.case:nth-child(even) .case-media { order: 2; }
.case-media { display: block; }
.case-media .photo img, .case-media .slot { aspect-ratio: 3 / 2; min-height: 0; }
.case h3 { font-size: 1.85rem; }
.case h3 a { color: var(--ink); text-decoration: none; }
.case h3 a:hover { color: var(--indigo); text-decoration: underline; }

/* ---------- projects: the stitched seam ---------- */
.seam { position: relative; padding-left: 0; }
.year { display: grid; grid-template-columns: 140px 1fr; position: relative; }
.year::before { content: ""; position: absolute; left: 118px; top: 0; bottom: 0; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--saffron) 0 9px, transparent 9px 16px); }
.year h3 { font-size: 2.1rem; color: var(--ink); position: relative; padding-top: 6px; margin: 0; }
.year h3::after { content: ""; position: absolute; left: 112px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--saffron); }
.year ul { list-style: none; margin: 0; padding: 4px 0 48px 8px; display: grid; gap: 4px; }
.item { padding: 10px 14px; border-radius: 10px; display: grid; grid-template-columns: 120px 1fr; column-gap: 16px; }
.item .type { grid-row: span 2; font-family: var(--head); font-size: 0.82rem; color: var(--muted); padding-top: 4px; }
.item .name { font-family: var(--head); font-weight: 600; font-size: 1.08rem; margin: 0; line-height: 1.3; }
.item .name a { color: var(--ink); }
.item .note { margin: 2px 0 0; font-size: 1rem; color: var(--muted); }
.item.big { background: var(--linen); }
.item.big .name { font-size: 1.22rem; }
.item.big .name a { text-decoration: none; }
.item.big .name a:hover { color: var(--indigo); text-decoration: underline; }
.item .more { margin-left: 8px; }
.older { margin-top: 8px; }
.older summary { cursor: pointer; display: inline-block; list-style: none; font-family: var(--head); font-weight: 600; border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 20px; margin: 0 0 40px 140px; }
.older summary::-webkit-details-marker { display: none; }
.older summary::after { content: " +"; }
.older[open] summary::after { content: " \2212"; }
.older summary:hover { background: var(--ink); color: var(--paper); }

/* ---------- community ---------- */
.community { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.comm { border-top: 3px solid var(--indigo); padding-top: 16px; }
.comm p { font-size: 1.02rem; color: var(--muted); }

/* ---------- instagram (Instagram's own profile embed, as on the current trtex.org) ---------- */
.ig-head { max-width: 900px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 16px; }
.ig-head h2 { margin: 0 0 4px; }
.ig-handle { margin: 0; font-family: var(--head); font-weight: 600; }
.ig-lead { max-width: 40em; color: var(--muted); font-size: 1.15rem; margin-bottom: 32px; }
.feed { max-width: 900px; background: #fff; border-radius: 16px; overflow: hidden; border: 2px solid var(--rule); }
.feed iframe { display: block; width: 100%; height: 640px; border: 0; }
.ig-fallback { margin: 14px 0 0; font-family: var(--head); font-size: 0.95rem; }

/* ---------- visibility ---------- */
.vis-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 56px; }
.vis-photos .photo img, .vis-photos .slot { aspect-ratio: 4 / 3; min-height: 0; }
.vis { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.vis-group ul { list-style: none; padding: 0; margin: 0; }
.vis-group li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 1.02rem; line-height: 1.45; }
.vis-group h3 { font-size: 1.1rem; }

/* ---------- contact ---------- */
.contact { background: var(--indigo); color: #fff; }
.contact a { color: #fff; }
.contact .lead { color: #E3E7FF; }
.contact-in { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: end; }
.contact h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.contact-list { margin: 0; }
.contact-list dt { font-family: var(--head); font-size: 0.88rem; color: #C9D0FF; margin-top: 18px; }
.contact-list dd { margin: 4px 0 0; font-family: var(--head); font-size: 1.1rem; }
.big-link { font-size: 1.6rem; font-weight: 700; color: var(--lime) !important; }

/* ---------- footer ---------- */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--rule); }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; }
.foot p { margin: 0; font-size: 1rem; color: var(--muted); }
.foot-links { margin-left: auto !important; display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--head); }

/* ---------- detail pages ---------- */
.detail { padding: 56px 0 96px; }
.back { font-family: var(--head); font-size: 0.95rem; }
.detail h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.facts-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--rule); }
.facts-row dt { font-family: var(--head); font-size: 0.85rem; color: var(--muted); }
.facts-row dd { margin: 2px 0 0; font-family: var(--head); font-size: 1rem; }
.detail-media { max-width: 980px; margin: 48px auto; }
.detail-media .photo img { max-height: 620px; object-fit: contain; background: var(--linen); }
.detail-media .slot { aspect-ratio: 16 / 9; min-height: 0; }
.detail-media { padding: 0 24px; }
.detail .prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.detail .prose ul { padding-left: 1.2em; }
.detail .prose li { margin-bottom: 0.7em; }
.episodes li { margin-bottom: 0.8em; }
.link-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.link-list a { font-family: var(--head); }
.quote { margin: 48px 0; padding: 28px 32px; border-left: 4px solid var(--lime); background: var(--linen); border-radius: 0 14px 14px 0; }
.quote blockquote { margin: 0; font-size: 1.3rem; font-style: italic; }
.quote figcaption { font-family: var(--head); font-size: 0.95rem; color: var(--muted); margin-top: 10px; }
.quote.is-draft { border: 2px dashed #B9BCB0; border-left: 4px solid var(--lime); }
.draft-tag { font-family: var(--head); font-size: 0.82rem; font-weight: 600; display: inline-block; background: var(--lime); padding: 2px 10px; border-radius: 999px; }
.others { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule); }
.others h2 { font-size: 1.2rem !important; margin-top: 0 !important; }
.others ul { list-style: none; padding: 0 !important; }
.others a { font-family: var(--head); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body { font-size: 1.125rem; }
  .section { padding: 72px 0; }
  .hero { padding: 40px 0 64px; }
  .hero-in, .founder-in, .case, .past, .contact-in { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { order: -1; max-width: 230px; }
  .facts, .values, .facts-row { grid-template-columns: 1fr; gap: 14px; }
  .founder-photos { position: static; }
  .service { grid-template-columns: 1fr; gap: 12px; }
  .training { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .training-meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
  .case:nth-child(even) .case-media { order: 0; }
  .community { grid-template-columns: 1fr; }
  .vis-photos { grid-template-columns: 1fr 1fr; }
  .vis { grid-template-columns: 1fr; gap: 32px; }
  .year { grid-template-columns: 1fr; padding-left: 36px; }
  .year::before { left: 10px; }
  .year h3::after { left: -32px; top: 16px; }
  .year ul { padding-left: 0; }
  .older summary { margin-left: 36px; }
  .hero-photo::before { display: none; }
  .item { grid-template-columns: 1fr; }
  .item .type { grid-row: auto; padding-top: 0; }
  .foot-links { margin-left: 0 !important; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .community, .vis-photos { grid-template-columns: 1fr; }

  .brand span { display: none; }
}
