/* LingoFruit Chinese · 灵果中文 — Homepage-specific layout
 * Loaded after /tokens.css and /site.css. */

/* ---- Hero ---- */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(40px, 6vw, 88px) 0 clamp(40px, 5vw, 68px);
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-display);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: var(--s-4) 0 var(--s-5);
  color: var(--ink);
}

.hero-copy h1 i {
  font-style: italic;
  color: var(--accent-mid);
}

.hero-copy .lead {
  max-width: 46ch;
  margin-bottom: var(--s-6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

/* ---- Site-wide search ---- */
.site-search {
  position: relative;
  margin-bottom: var(--s-6);
  max-width: 560px;
}

.site-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.site-search-box .search-ico {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--ink-3);
  pointer-events: none;
}

.site-search-box input {
  width: 100%;
  padding-left: 42px;
  padding-right: 42px;
  min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.site-search-box .search-clear {
  position: absolute;
  right: 6px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  border-radius: var(--r-sm);
  cursor: pointer;
}

.site-search-box .search-clear:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
}

.search-empty {
  padding: var(--s-4) var(--s-5);
  color: var(--ink-3);
  font-size: var(--text-sm);
}

.search-group {
  border-bottom: 1px solid var(--rule);
  padding: var(--s-2) 0;
}

.search-group:last-child {
  border-bottom: 0;
}

.search-group-lbl {
  padding: var(--s-1) var(--s-4);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--s-3);
  align-items: center;
  padding: var(--s-2) var(--s-4);
  min-height: 48px;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease);
}

.search-row:hover {
  background: var(--paper);
}

.sr-main {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.sr-main strong {
  font-family: var(--font-zh);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
}

.sr-main .sr-glyph {
  font-size: 1.375rem;
}

.sr-py {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ochre);
}

.sr-en {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}

.sr-desc {
  grid-column: 1;
  font-size: var(--text-xs);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sr-tag {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-rule);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  white-space: nowrap;
}

/* ---- Continue where you left off ---- */
.resume-section {
  margin-bottom: var(--s-5);
}

.resume-card {
  background: var(--surface);
  border: 1px solid var(--accent-rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.resume-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
  padding: var(--s-5);
  text-decoration: none;
  transition: background var(--t-fast) var(--ease);
}

.resume-main:hover {
  background: var(--paper);
}

.resume-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.resume-title {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

.resume-sub {
  font-size: var(--text-sm);
  color: var(--ink-2);
}

.resume-others {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--rule-soft);
  background: var(--surface-2);
}

.resume-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.resume-pill:hover {
  border-color: var(--accent-mid);
  color: var(--accent);
}

/* Factual studio stats strip */
.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-4);
  margin: 0;
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
}

.hero-facts > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.hero-facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: var(--accent);
}

.hero-facts dt {
  font-size: var(--text-xs);
  color: var(--ink-3);
  line-height: 1.35;
}

/* ---- Phrase of the day specimen plate ---- */
.plate {
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.plate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--rule);
  background: var(--surface-2);
}

.plate-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-3);
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}

.plate-body {
  padding: clamp(32px, 5vw, 56px) var(--s-5);
  text-align: center;
  display: grid;
  place-items: center;
  gap: var(--s-5);
}

.phrase {
  font-family: var(--font-zh);
  font-size: var(--zh-hero);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.phrase ruby {
  ruby-align: center;
  margin-inline: 2px;
}

.phrase rt {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ochre);
}

.phrase-punct {
  color: var(--ink-3);
}

.plate-en {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink-2);
}

.plate-foot {
  border-top: 1px solid var(--rule);
  padding: var(--s-3) var(--s-5);
  background: var(--surface);
}

.plate-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 44px;
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  transition: color var(--t-fast) var(--ease);
}

.plate-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.plate-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---- Three ways to study ---- */
.jobs-section,
.directory-section {
  border-top: 1px solid var(--rule);
  padding-top: var(--s-7);
  margin-top: var(--s-5);
}

.section-intro {
  margin-bottom: var(--s-6);
}

.section-intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h2);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: var(--s-2) 0 0;
  color: var(--ink);
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}

.job-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}

.job-card:hover {
  border-color: var(--accent-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.job-num {
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.job-ico {
  width: 24px;
  height: 24px;
  color: var(--accent-mid);
}

.job-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.625rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.job-zh {
  margin: 4px 0 var(--s-4);
  font-family: var(--font-zh);
  font-size: var(--text-sm);
  color: var(--ochre);
  font-weight: 500;
}

.job-desc {
  margin: 0 0 var(--s-6);
  color: var(--ink-2);
  font-size: var(--text-base);
  line-height: 1.6;
  flex: 1 0 auto;
}

.job-links {
  border-top: 1px solid var(--rule-soft);
  padding-top: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.job-primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: 44px;
  text-decoration: none;
  font-weight: 650;
  font-size: var(--text-sm);
  color: var(--accent);
}

.job-primary:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.job-primary svg {
  width: 16px;
  height: 16px;
}

.job-sublinks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
}

.job-sublinks a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: var(--text-sm);
  color: var(--ink-3);
  text-decoration: none;
}

.job-sublinks a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---- Studio directory ---- */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--s-7);
  border-top: 1px solid var(--rule);
}

.dir-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-2);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  min-height: 68px;
  transition: background var(--t-fast) var(--ease), padding-inline var(--t-fast) var(--ease);
}

.dir-item:hover {
  background: var(--surface);
  padding-inline: var(--s-3);
}

.dir-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dir-main strong {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
}

.dir-main strong span {
  font-family: var(--font-zh);
  font-weight: 400;
  color: var(--ink-3);
  font-size: var(--text-sm);
}

.dir-main > span {
  font-size: var(--text-sm);
  color: var(--ink-3);
  line-height: 1.45;
}

.dir-arrow {
  color: var(--accent-mid);
  font-size: 1.125rem;
  flex-shrink: 0;
  transition: transform var(--t-fast) var(--ease);
}

.dir-item:hover .dir-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }

  .job-grid {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-4) var(--s-5);
  }

  .plate-body {
    padding: var(--s-6) var(--s-4);
  }

  .job-card {
    padding: var(--s-5);
  }
}
