/*
Theme Name: Talk Yorùbá
Theme URI: https://talkyoruba.com
Author: Kọ́lá Abímbọ́lá
Description: Theme for talkyoruba.com, home of the Ède Yorùbá language app. Homepage, Privacy Policy and Terms of Use are set up on activation; the Ẹbí wa family band sits in the footer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: talkyoruba
*/

:root {
  --ink: #231A14;
  --ink-2: rgba(35, 26, 20, .68);
  --ink-3: rgba(35, 26, 20, .45);
  --paper: #F6F1EA;
  --paper-2: #EFE7DC;
  --card: #FFFFFF;
  --oxblood: #5B1A10;
  --coral: #B8341F;
  --coral-2: #D9573C;
  --gold: #A8822C;
  --line: rgba(35, 26, 20, .12);
  --radius: 18px;
  --serif: "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --shadow: 0 1px 2px rgba(35, 26, 20, .06), 0 10px 30px rgba(35, 26, 20, .07);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* Times New Roman throughout, so every Yorùbá word — tone marks and underdots — is set in it; the sans is for small interface labels only */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 19px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.ty-btn, .ty-menu a, .ty-kicker, .ty-stats dt, .ty-tone-pitch, .ty-level-n, .ty-level-code, .ty-step-n, .ty-skip, .ty-copy, .ty-foot-links a, .ty-word-card small { font-family: var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--oxblood); text-underline-offset: .18em; }
a:hover { color: var(--coral); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* Yorùbá text is always set in Times New Roman */
[lang="yo"], .yo { font-family: var(--serif); }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.ty-skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.ty-skip:focus { left: 12px; }
.ty-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.ty-narrow { max-width: 780px; }
.ty-center { text-align: center; }

/* Buttons */
.ty-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; background: var(--oxblood); color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; border: 1px solid var(--oxblood); transition: background .2s, transform .2s, color .2s; }
.ty-btn:hover { background: var(--coral); border-color: var(--coral); color: #fff; transform: translateY(-1px); }
.ty-btn-sm { padding: 9px 18px; font-size: 15px; }
.ty-btn-ghost { background: transparent; color: var(--oxblood); }
.ty-btn-ghost:hover { background: rgba(91, 26, 16, .07); color: var(--oxblood); }
.ty-btn-light { background: #fff; color: var(--oxblood); border-color: #fff; }
.ty-btn-light:hover { background: var(--paper); color: var(--oxblood); border-color: var(--paper); }
.ty-btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.ty-btn-ghost-light:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: #fff; }
.ty-link { font-weight: 600; text-decoration: none; }
.ty-link:hover { text-decoration: underline; }

/* Header */
.ty-header { position: sticky; top: 0; z-index: 50; background: rgba(246, 241, 234, .88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar .ty-header { top: 32px; }
.ty-header-in { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.ty-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.ty-brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.ty-brand-name { font-family: var(--serif); font-size: 24px; letter-spacing: -.01em; }
.ty-brand-name .yo { color: var(--oxblood); }
.ty-nav { display: flex; align-items: center; gap: 26px; }
.ty-menu { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.ty-menu a { color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 500; }
.ty-menu a:hover { color: var(--coral); }
.ty-nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.ty-nav-toggle span:not(.screen-reader-text) { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.ty-nav-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
.ty-nav-toggle[aria-expanded="true"] span:nth-of-type(3) { opacity: 0; }
.ty-nav-toggle[aria-expanded="true"] span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }

/* Type */
.ty-kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 0 0 14px; }
.ty-kicker .yo { text-transform: none; letter-spacing: 0; font-size: 17px; font-weight: 400; color: var(--oxblood); }
.ty-display { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 9vw, 112px); line-height: .95; letter-spacing: -.02em; margin: 0 0 22px; color: var(--oxblood); }
.ty-display-en { display: block; font-size: .36em; letter-spacing: 0; color: var(--ink-2); margin-top: 14px; font-style: italic; }
.ty-h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.06; letter-spacing: -.01em; margin: 0 0 16px; }
.ty-h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; margin: 0 0 12px; }
.ty-lede { font-size: 22px; line-height: 1.55; color: var(--ink-2); max-width: 34em; margin: 0 0 30px; }
.ty-sub { font-size: 20px; color: var(--ink-2); max-width: 38em; margin: 0; }
.ty-price-note { margin: 16px 0 0; font-size: 16px; color: var(--ink-2); }
.ty-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

/* Hero */
.ty-hero { padding: 64px 0 40px; overflow: hidden; }
.ty-hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.ty-hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 540px; width: 100%; justify-self: end; }
.ty-hero-disc { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0, #fbf6ef 45%, var(--paper-2) 100%); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.ty-hero-img { position: absolute; mix-blend-mode: multiply; }
.ty-hero-img-a { width: 70%; left: 4%; top: 6%; transform: rotate(-8deg); }
.ty-hero-img-b { width: 56%; right: -2%; bottom: 2%; transform: rotate(14deg); }
.ty-word-card { position: absolute; background: var(--card); border-radius: 14px; padding: 10px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; line-height: 1.2; animation: ty-float 6s ease-in-out infinite; }
.ty-word-card span { font-size: 26px; color: var(--oxblood); }
.ty-word-card small { font-size: 13px; color: var(--ink-2); }
.ty-word-card-a { left: 0; bottom: 18%; }
.ty-word-card-b { right: 2%; top: 10%; animation-delay: -3s; }
@keyframes ty-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .ty-word-card { animation: none; } html { scroll-behavior: auto; } }

.ty-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 54px 0 0; }
.ty-stats > div { background: var(--card); padding: 22px 24px; }
.ty-stats dt { font-size: 14px; color: var(--ink-2); order: 2; }
.ty-stats dd { margin: 0 0 2px; font-family: var(--serif); font-size: 42px; line-height: 1.1; color: var(--oxblood); }
.ty-stats > div { display: flex; flex-direction: column-reverse; }

/* Sections */
.ty-section { padding: 96px 0; }
.ty-section-head { max-width: 760px; margin: 0 0 44px; }

/* Tones */
.ty-tones { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ty-tone-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ty-tone { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 22px; display: flex; flex-direction: column; gap: 4px; background: linear-gradient(180deg, #fff, #fcf9f5); transition: transform .2s, box-shadow .2s; }
.ty-tone:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ty-tone-yo { font-size: 58px; line-height: 1.05; color: var(--oxblood); }
.ty-tone-en { font-size: 18px; }
.ty-tone-pitch { font-size: 13px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; margin-top: 8px; }

/* Steps */
.ty-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.ty-steps li { position: relative; padding-top: 18px; border-top: 2px solid var(--ink); }
.ty-step-n { font-family: var(--serif); font-size: 15px; color: var(--gold); }
.ty-steps h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 6px 0 8px; }
.ty-steps p { margin: 0; color: var(--ink-2); font-size: 18px; }

/* Levels */
.ty-levels { background: var(--paper-2); }
.ty-level-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 40px; }
.ty-level { background: var(--card); border-radius: var(--radius); padding: 24px 22px; box-shadow: var(--shadow); border-top: 5px solid var(--lvl, var(--gold)); }
.ty-level-1 { --lvl: #C9A24A; } .ty-level-2 { --lvl: #D9573C; } .ty-level-3 { --lvl: #8E2A18; } .ty-level-4 { --lvl: #3B1A10; }
.ty-level-n { font-size: 12.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); margin: 0; font-weight: 700; }
.ty-level-name { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 2px 0 14px; color: var(--lvl); }
.ty-level ul { list-style: none; margin: 0; padding: 0; }
.ty-level li + li { border-top: 1px solid var(--line); }
.ty-level a { display: block; padding: 10px 0; text-decoration: none; color: var(--ink); font-size: 17.5px; line-height: 1.35; }
.ty-level a:hover { color: var(--coral); }
.ty-level-code { display: block; font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }

/* Words */
.ty-word-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ty-word { background: var(--card); border-radius: var(--radius); padding: 18px 18px 20px; box-shadow: var(--shadow); text-align: center; transition: transform .25s; }
.ty-word:hover { transform: translateY(-4px); }
.ty-word-img { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 12px; background: #fff; }
.ty-word-img img { max-height: 100%; width: auto; object-fit: contain; transition: transform .4s; }
.ty-word:hover .ty-word-img img { transform: scale(1.05); }
.ty-word-yo { font-size: 34px; color: var(--oxblood); margin: 12px 0 0; line-height: 1.15; }
.ty-word-en { margin: 2px 0 0; color: var(--ink-2); font-size: 17px; }

/* Generations */
.ty-gen { background: var(--ink); color: #F3EDE4; }
.ty-gen .ty-kicker { color: #D7B65E; }
.ty-gen-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.ty-gen-fig { margin: 0; border-radius: var(--radius); overflow: hidden; background: #fff; }
.ty-gen-fig img { width: 100%; filter: contrast(1.02); }
.ty-gen-copy p { color: rgba(243, 237, 228, .8); font-size: 19px; }

/* Roots */
.ty-roots-in { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ty-roots-card { background: var(--card); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: start; }
.ty-roots-card p { color: var(--ink-2); font-size: 18px; margin: 0 0 10px; }
.ty-roots-book { width: 150px; transform: rotate(-3deg); box-shadow: 0 8px 22px rgba(0, 0, 0, .16); border-radius: 4px; }
.ty-credit-logo { width: 140px; }

/* Closing CTA */
.ty-cta { background: linear-gradient(120deg, var(--oxblood), #7A2614 60%, var(--coral)); color: #fff; padding: 80px 0; overflow: hidden; }
.ty-cta-in { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: center; }
.ty-cta-img { width: 260px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .35)); border-radius: 50%; background: #fff; padding: 18px; }
.ty-cta .ty-h2 { color: #fff; }
.ty-cta .ty-display-en { color: rgba(255, 255, 255, .78); font-size: .5em; }
.ty-cta p { font-size: 18.5px; color: rgba(255, 255, 255, .86); margin: 0 0 24px; max-width: 32em; }

/* Pages */
.ty-page { padding: 64px 0 90px; }
.ty-page-app { padding-top: 40px; }
.ty-page-title { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 56px); line-height: 1.05; margin: 0 0 28px; color: var(--oxblood); }
.ty-page-title a { color: inherit; text-decoration: none; }
.ty-prose { font-size: 19px; line-height: 1.7; }
.ty-prose h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 44px 0 12px; color: var(--ink); }
.ty-prose h3 { font-size: 18px; margin: 28px 0 8px; }
.ty-prose ul, .ty-prose ol { padding-left: 1.3em; }
.ty-prose li { margin: 6px 0; }
.ty-prose .ty-updated { color: var(--ink-3); font-size: 15px; margin-top: -14px; }
.ty-prose table { border-collapse: collapse; width: 100%; font-size: 15.5px; margin: 16px 0; }
.ty-prose th, .ty-prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.ty-prose th { background: var(--paper-2); }
.ty-app { background: transparent; }
.ty-404 { text-align: left; padding: 40px 24px; }

/* Footer */
.ty-footer { background: var(--ink); color: #F3EDE4; padding: 60px 0 30px; margin-top: 0; }
.ty-foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.ty-foot-brand { font-family: var(--serif); font-size: 30px; margin: 0; }
.ty-foot-brand .yo { color: #D7B65E; }
.ty-foot-tag { margin: 4px 0 0; color: rgba(243, 237, 228, .7); }
.ty-foot-links { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.ty-foot-links a { color: #F3EDE4; text-decoration: none; }
.ty-foot-links a:hover { color: #D7B65E; text-decoration: underline; }
.ty-band { margin-top: 10px; }
.ty-band .wff { border-top-color: rgba(243, 237, 228, .18); }
.ty-band .wff-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
.ty-copy { color: rgba(243, 237, 228, .55); font-size: 14px; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid rgba(243, 237, 228, .12); }

/* Responsive */
@media (max-width: 1020px) {
  .ty-tone-grid, .ty-steps, .ty-level-grid { grid-template-columns: repeat(2, 1fr); }
  .ty-roots-in { grid-template-columns: 1fr; }
  .ty-gen-in { gap: 36px; }
}
@media (max-width: 820px) {
  .ty-wrap { padding: 0 16px; }
  .ty-nav-toggle { display: block; }
  .ty-nav { position: absolute; top: 70px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 18px; display: none; box-shadow: 0 12px 24px rgba(0,0,0,.08); }
  .ty-nav.open { display: flex; }
  .ty-menu { flex-direction: column; gap: 0; }
  .ty-menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .ty-nav .ty-btn { margin-top: 14px; justify-content: center; }
  .ty-hero { padding-top: 36px; }
  .ty-hero-in { grid-template-columns: 1fr; }
  .ty-hero-art { justify-self: center; max-width: 420px; }
  .ty-stats { grid-template-columns: repeat(2, 1fr); }
  .ty-stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  body { font-size: 18px; }
  .ty-section { padding: 68px 0; }
  .ty-word-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .ty-gen-in { grid-template-columns: 1fr; }
  .ty-cta-in { grid-template-columns: 1fr; gap: 28px; }
  .ty-cta-img { width: 170px; }
}
@media (max-width: 560px) {
  .ty-tone-grid, .ty-steps, .ty-level-grid { grid-template-columns: 1fr; }
  .ty-roots-card { grid-template-columns: 1fr; }
  .ty-roots-book { width: 130px; }
  .ty-word-yo { font-size: 28px; }
  .ty-stats dd { font-size: 34px; }
  .ty-lede { font-size: 18px; }
}
@media (max-width: 782px) { .admin-bar .ty-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .ty-header { top: 0; } }
