/* Conversion Masters — interactive components */

/* ---------- Scroll progress + back to top ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }
.to-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 40; width: 48px; height: 48px;
  background: var(--ink); color: var(--gold-soft); border: 1px solid var(--gold-soft); cursor: pointer; font-size: 1.1rem;
  opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .3s, transform .3s, background .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--gold-soft); color: var(--ink); }

/* ---------- Dropdown navigation ---------- */
.drop { position: relative; }
.drop-btn {
  background: none; border: 0; cursor: pointer; font: inherit; color: #e9e3d3; font-size: .9rem; font-weight: 500; letter-spacing: .04em;
  padding: .4rem 0; border-bottom: 1px solid transparent; display: inline-flex; align-items: center; gap: .45rem; transition: color .2s, border-color .2s;
}
.drop-btn::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .25s; }
.drop:hover .drop-btn, .drop.open .drop-btn, .drop-btn.current { color: var(--gold-soft); }
.drop-btn.current { border-color: var(--gold-soft); }
.drop.open .drop-btn::after { transform: translateY(2px) rotate(225deg); }
.drop-menu {
  position: absolute; top: calc(100% + 14px); left: -1.2rem; min-width: 250px; padding: .6rem 0;
  background: var(--ink); border: 1px solid rgba(217, 184, 113, .3); border-top: 2px solid var(--gold-soft);
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s;
}
.drop-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.drop:hover .drop-menu, .drop:focus-within .drop-menu, .drop.open .drop-menu { opacity: 1; visibility: visible; transform: none; }
#nav .drop-menu a { display: block; padding: .65rem 1.3rem; border: 0; }
#nav .drop-menu a:hover, #nav .drop-menu a[aria-current="page"] { background: rgba(217, 184, 113, .1); border: 0; }

/* ---------- Tabs ---------- */
.tablist { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2.2rem 0 0; }
.tablist button {
  font: inherit; font-size: .84rem; font-weight: 600; letter-spacing: .08em; cursor: pointer;
  padding: .8rem 1.3rem; background: transparent; color: var(--ink); border: 1px solid var(--line); transition: all .2s;
}
.tablist button:hover { border-color: var(--gold); }
.tablist button[aria-selected="true"] { background: var(--ink); color: var(--gold-soft); border-color: var(--ink); }
.dark .tablist button { color: #d6cfbd; border-color: rgba(217, 184, 113, .3); }
.dark .tablist button[aria-selected="true"] { background: var(--gold-soft); color: var(--ink); border-color: var(--gold-soft); }
.tabpanel { display: none; margin-top: 2rem; animation: panel .5s ease both; }
.tabpanel.active { display: block; }
@keyframes panel { from { opacity: 0; transform: translateY(14px); } }
.panel-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.panel-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.panel-box { background: #fbf7ec; border: 1px solid var(--line); border-left: 3px solid var(--gold); padding: 2rem 2.2rem; }
.panel-box p:last-child { margin-bottom: 0; }
.dark .panel-box { background: rgba(255, 255, 255, .04); border-color: rgba(217, 184, 113, .25); border-left-color: var(--gold-soft); }

/* stepper variant */
.stepper .tablist { gap: 0; counter-reset: st; border-bottom: 1px solid var(--line); }
.stepper .tablist button {
  counter-increment: st; flex: 1 1 0; min-width: 130px; border: 0; border-bottom: 3px solid transparent; text-align: left;
  padding: 1rem 1rem 1.1rem; letter-spacing: .02em; font-weight: 500; color: var(--muted); background: none;
}
.stepper .tablist button::before { content: "0" counter(st); display: block; font-family: var(--display); font-size: 1.5rem; color: var(--gold); margin-bottom: .2rem; }
.stepper .tablist button[aria-selected="true"] { background: none; color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.step-nav { display: flex; gap: .8rem; margin-top: 1.6rem; }
.step-nav button { font: inherit; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; background: none; border: 1px solid var(--gold); color: var(--ink); padding: .7rem 1.2rem; }
.step-nav button:hover:not(:disabled) { background: var(--gold); }
.step-nav button:disabled { opacity: .35; cursor: default; }

/* ---------- Tick lists ---------- */
.ticks { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.ticks li { position: relative; padding: .45rem 0 .45rem 2rem; }
.ticks li::before { content: "☦"; position: absolute; left: 0; top: .4rem; color: var(--gold); font-size: 1rem; }

/* ---------- Accordion ---------- */
.faq { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.35rem 0; font-family: var(--display); font-size: 1.3rem; color: var(--ink); transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--vermilion); }
.faq summary::after {
  content: "+"; flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%;
  font-family: var(--body); font-size: 1.2rem; color: var(--gold); transition: transform .3s, background .3s, color .3s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--gold); color: #fff; }
.faq .answer { padding: 0 3.5rem 1.5rem 0; animation: panel .4s ease both; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Filterable topics ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0; }
.filters button {
  font: inherit; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  padding: .6rem 1.1rem; border: 1px solid var(--gold); background: transparent; color: #6d5220; border-radius: 99px; transition: all .2s;
}
.filters button:hover { background: rgba(184, 138, 53, .14); }
.filters button[aria-pressed="true"] { background: var(--gold); color: #fff; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.3rem; }
.topic {
  background: #fbf7ec; border: 1px solid var(--line); padding: 1.7rem 1.6rem; display: flex; flex-direction: column;
  transition: transform .3s, box-shadow .3s, opacity .3s;
}
.topic:hover { transform: translateY(-4px); box-shadow: 0 22px 36px -26px rgba(20, 28, 51, .5); }
.topic.hide { display: none; }
.topic .tag { font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: .7rem; }
.topic h3 { font-size: 1.3rem; }
.topic p { font-size: .95rem; color: #4a4a4a; flex: 1; }
.topic a { font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.topic a:hover { text-decoration: underline; }
.count { font-size: .85rem; color: var(--muted); margin: -1rem 0 1.4rem; }

/* ---------- Gallery + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: .9rem; margin-top: 2.5rem; }
.gallery figure { overflow: hidden; position: relative; background: var(--ink); }
.gallery figure:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery figure:nth-child(4) { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s ease, opacity .4s; }
.gallery figure:hover img { transform: scale(1.07); opacity: .85; }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2rem 1rem .8rem; font-size: .8rem; color: #fff;
  background: linear-gradient(transparent, rgba(15, 22, 43, .85)); opacity: 0; transition: opacity .3s; pointer-events: none;
}
.gallery figure:hover figcaption { opacity: 1; }
.zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10, 14, 28, .94); display: none;
  align-items: center; justify-content: center; flex-direction: column; padding: 3.5rem 1rem 2rem;
}
.lightbox.open { display: flex; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } }
.lightbox img { max-width: min(1100px, 92vw); max-height: 76vh; object-fit: contain; box-shadow: 0 0 0 1px rgba(217, 184, 113, .5); }
.lightbox p { color: #d6cfbd; font-size: .9rem; margin: 1rem 0 0; text-align: center; max-width: 60ch; }
.lightbox button {
  position: absolute; background: none; border: 1px solid rgba(217, 184, 113, .5); color: var(--gold-soft);
  width: 46px; height: 46px; font-size: 1.3rem; cursor: pointer; transition: background .2s, color .2s;
}
.lightbox button:hover { background: var(--gold-soft); color: var(--ink); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; }
.lb-next { right: 1rem; top: 50%; }

/* ---------- Rotating verses ---------- */
.rotator { position: relative; min-height: 11.5rem; }
.rotator blockquote { position: absolute; inset: 0; opacity: 0; transform: translateY(10px); transition: opacity .9s ease, transform .9s ease; pointer-events: none; }
.rotator blockquote.on { opacity: 1; transform: none; pointer-events: auto; }
.dots { display: flex; justify-content: center; gap: .6rem; margin-top: 2rem; }
.dots button { width: 9px; height: 9px; border-radius: 50%; padding: 0; border: 1px solid var(--gold-soft); background: transparent; cursor: pointer; }
.dots button.on { background: var(--gold-soft); }

/* ---------- Partner strip / notes ---------- */
.note { border-left: 3px solid var(--gold); background: rgba(184, 138, 53, .09); padding: 1.1rem 1.4rem; font-size: .95rem; margin-top: 1.6rem; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 2.5rem; }
.link-card { display: block; text-decoration: none; color: inherit; }
.link-card h3::after { content: " →"; color: var(--gold); transition: margin .2s; }
.link-card:hover h3::after { margin-left: .3em; }

@media (max-width: 920px) {
  .drop-btn { width: 100%; padding: .9rem 0 .3rem; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); border: 0; }
  .drop-btn::after { display: none; }
  .drop-menu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0; min-width: 0; }
  #nav .drop-menu a { padding: .7rem 0 .7rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .panel-grid, .duo { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .stepper .tablist button { min-width: 50%; }
  .faq .answer { padding-right: 0; }
  .rotator { min-height: 15rem; }
}

/* ---------- Legal page ---------- */
.legal-doc { display: grid; grid-template-columns: 240px 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.legal-nav { position: sticky; top: 100px; display: flex; flex-direction: column; gap: .15rem; border-left: 1px solid var(--gold); padding-left: 1.2rem; font-size: .9rem; }
.legal-nav strong { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.legal-nav a { color: var(--text); text-decoration: none; padding: .25rem 0; }
.legal-nav a:hover { color: var(--vermilion); }
.legal-body { max-width: 720px; }
.legal-body h2 { font-size: 1.7rem; margin-top: 2.6rem; scroll-margin-top: 100px; }
.legal-body code { background: var(--parchment-2); padding: .1em .4em; font-size: .9em; }

/* ---------- Non-profit statement ---------- */
.nonprofit { margin: 3rem 0 0; padding: 1.2rem 1.4rem; border: 1px solid rgba(217, 184, 113, .28); font-size: .86rem; color: #cfc8b6; display: flex; gap: 1rem; align-items: flex-start; }
.nonprofit::before { content: "☦"; color: var(--gold-soft); font-size: 1.2rem; line-height: 1.3; }
.site-footer .legal { margin-top: 1.5rem; }
.badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.badges span { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; padding: .5rem .9rem; border: 1px solid var(--gold-soft); color: var(--gold-soft); }

/* ---------- Cookie notice ---------- */
.cookie {
  position: fixed; left: 1.2rem; right: 1.2rem; bottom: 1.2rem; z-index: 70; max-width: 640px; margin-inline: auto;
  background: var(--ink); color: #d6cfbd; border: 1px solid rgba(217, 184, 113, .45); border-top: 3px solid var(--gold-soft);
  padding: 1.2rem 1.4rem; font-size: .9rem; display: flex; gap: 1.2rem; align-items: center; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
  animation: rise .6s ease both;
}
.cookie p { margin: 0; }
.cookie a { color: var(--gold-soft); }
.cookie button { flex: none; font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; background: var(--gold-soft); color: var(--ink); border: 0; padding: .8rem 1.3rem; }
.cookie button:hover { background: #fff; }

@media (max-width: 920px) {
  .legal-doc { grid-template-columns: 1fr; }
  .legal-nav { position: static; }
  .cookie { flex-direction: column; align-items: stretch; }
}

/* ---------- Language switcher ---------- */
#nav { margin-left: auto; }
.lang { display: inline-flex; flex: none; padding: 3px; border: 1px solid rgba(217, 184, 113, .45); border-radius: 99px; background: rgba(255, 255, 255, .04); }
.lang a {
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; line-height: 1; color: #cfc8b6; text-decoration: none;
  padding: .5rem .8rem; border-radius: 99px; transition: background .25s, color .25s;
}
.lang a.on { background: var(--gold-soft); color: var(--ink); cursor: default; }
.lang a:not(.on):hover { background: rgba(217, 184, 113, .18); color: #fff; }
@media (max-width: 920px) {
  .lang { margin-left: auto; order: 2; }
  .nav-toggle { order: 3; }
  .bar { gap: .8rem; }
}
@media (max-width: 560px) {
  .brand strong { font-size: 1.08rem; }
  .brand-mark { width: 38px; height: 44px; }
}

/* ================= Audit fixes ================= */

/* 1. Without JavaScript everything stays visible and readable */
html:not(.js) .reveal { opacity: 1; transform: none; }
html:not(.js) .tabpanel { display: block; margin-top: 2.5rem; }
html:not(.js) .tablist, html:not(.js) .step-nav, html:not(.js) .filters, html:not(.js) .count { display: none; }
html:not(.js) .rotator { min-height: 0; }
html:not(.js) .rotator blockquote { position: static; opacity: 1; transform: none; margin-bottom: 2.5rem; }

/* 2. Readable gold on light backgrounds (contrast of at least 4.5:1) */
:root { --gold-text: #7f5b12; }
.eyebrow, .greek, .card .num, .site-entry .idx, .topic .tag, .info-list strong, .legal-nav strong,
.steps li::before, .stepper .tablist button::before, .ticks li::before, .faq summary::after { color: var(--gold-text); }
.faq details[open] summary::after { color: #fff; background: var(--gold-text); border-color: var(--gold-text); }
.hero .eyebrow, .dark .eyebrow, .cta .eyebrow, .page-hero .greek, .city-body .greek, .dark .greek,
.dark .card .num, .dark .ticks li::before { color: var(--gold-soft); }
.dark .steps li::before { color: var(--gold-text); }

/* 4. Keyboard users: skip link and a clearly visible focus ring */
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--gold-soft); color: var(--ink); font-weight: 600; padding: .8rem 1.2rem; text-decoration: none; transition: top .2s; }
.skip:focus { top: 1rem; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--vermilion); outline-offset: 3px; }
.site-header :focus-visible, .hero :focus-visible, .page-hero :focus-visible, .dark :focus-visible, .cta :focus-visible,
.site-footer :focus-visible, .lightbox :focus-visible, .cookie :focus-visible, .city:focus-visible { outline-color: var(--gold-soft); }
main:focus { outline: none; }

/* Founder note (About Us): a small framed portrait with a short caption */
.founder-note { padding-block: clamp(2.5rem, 5vw, 4rem); }
.founder-card { display: flex; align-items: center; gap: 1.6rem; max-width: 34rem; margin: 0 auto; padding: 0; }
.founder-card img { flex: none; width: 104px; height: 130px; object-fit: cover; object-position: 50% 12%;
  padding: 5px; background: #fff; border: 1px solid var(--gold); box-shadow: 0 6px 18px rgba(20, 28, 51, .12); }
.founder-card figcaption { border-left: 1px solid var(--gold); padding-left: 1.6rem; }
.founder-card .eyebrow { margin-bottom: .35rem; }
.founder-card strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.45rem; line-height: 1.2; }
.founder-card p { margin: .45rem 0 0; font-size: .95rem; }
@media (max-width: 520px) { .founder-card { gap: 1.1rem; } .founder-card img { width: 84px; height: 105px; } .founder-card figcaption { padding-left: 1.1rem; } }

/* ================= UI/UX pass: phones, tablets and desktop ================= */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
[id] { scroll-margin-top: 96px; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; }
p, li, a { overflow-wrap: break-word; }
button, .btn, summary { touch-action: manipulation; }

/* Small print stays readable */
.credit { font-size: .76rem; }
.topic .tag { font-size: .74rem; }
.legal-nav strong { font-size: .74rem; }

/* Comfortable tap targets */
.lang a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 .85rem; }
.dots { gap: .15rem; }
.dots button { width: 30px; height: 30px; border: 0; border-radius: 0; background: none; display: grid; place-items: center; }
.dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--gold-soft); transition: background .2s; }
.dots button.on { background: none; }
.dots button.on::before, .dots button:hover::before { background: var(--gold-soft); }
.topic a { display: inline-block; padding: .55rem 0; margin-bottom: -.55rem; }
.cookie, .to-top { bottom: max(1.2rem, env(safe-area-inset-bottom)); }

/* Touch screens have no hover: show photo captions, drop the hover lift */
@media (hover: none) {
  .gallery figcaption { opacity: 1; }
  .card:hover, .topic:hover, .btn-solid:hover, .btn-dark:hover { transform: none; box-shadow: none; }
  .gallery figure:hover img, .city:hover img { transform: none; opacity: 1; }
}

@media (max-width: 920px) {
  /* Long menus scroll inside the screen instead of running off it */
  #nav { max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain; }
  .lang a { min-height: 40px; padding: 0 .95rem; }
  .site-footer li { margin-bottom: 0; }
  .site-footer li a { display: inline-block; padding: .45rem 0; }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; }
}
@media (min-width: 561px) and (max-width: 920px) {
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > :first-child { grid-column: 1 / -1; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  h1 { font-size: clamp(2rem, 8.8vw, 2.5rem); }
  h2 { font-size: clamp(1.65rem, 7vw, 1.9rem); }
  .lead { font-size: 1.08rem; }
  .page-hero .wrap { padding-block: 3.5rem 2.5rem; }
  .actions .btn, form.contact .btn { flex: 1 1 100%; width: 100%; text-align: center; }
  .card, .panel-box { padding: 1.6rem 1.3rem; }
  .steps li { padding-left: 2.6rem; margin-left: 1.2rem; }
  .gallery { grid-auto-rows: 140px; }
  .legal { flex-direction: column; }
  .nonprofit { padding: 1rem 1.1rem; }
}

/* Rotating verses: the box takes the height of the longest verse, so no empty gap on phones */
.rotator { display: grid; align-items: center; min-height: 0; }
.rotator blockquote { position: static; grid-area: 1 / 1; }
html:not(.js) .rotator { display: block; }
