/* =========================================================================
   KADI YAMA MUSIC — STYLES
   1. Tokens  2. Base  3. Layout  4. Buttons  5. Placeholders  6. Nav
   7. Hero  8. Services  9. Work  10. About  11. Approach  12. Contact
   13. Footer  14. Motion
   ========================================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand palette (matched to the Kadi Yama logo) */
  --sage: #BFC99A;
  --sage-soft: #DCE2CE;
  --sage-deep: #8E9A62;   /* sage tuned for small text/borders on light bg */
  --plum: #32132D;
  --plum-2: #44203E;      /* raised surfaces on plum */
  --plum-3: #5A2E52;      /* borders on plum */
  --charcoal: #211F22;
  --charcoal-2: #2C2A2E;
  --ivory: #F3F0E8;
  --paper: #FBFAF6;       /* cards on ivory */
  --mauve: #806078;
  --ink: #32132D;
  --ink-soft: #5B4A57;    /* secondary text on light */
  --on-dark: #F3F0E8;
  --on-dark-soft: #CFC6CC;
  --error: #A8322D;
  --error-on-dark: #F2A6A0;

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --header-h: 76px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-pad: clamp(80px, 11vw, 140px);
  --shadow: 0 24px 48px -24px rgba(50, 19, 45, 0.35);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  overflow-x: hidden;
}
img, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--mauve); outline-offset: 3px; border-radius: 6px; }
.section-plum :focus-visible,
.section-charcoal :focus-visible,
.site-footer :focus-visible { outline-color: var(--sage); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 300;
  background: var(--plum); color: var(--ivory); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Layout ---------- */
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); }
.section-ivory { background: var(--ivory); }
.section-sage-soft { background: var(--sage-soft); }
.section-plum { background: var(--plum); color: var(--on-dark); }
.section-charcoal { background: var(--charcoal); color: var(--on-dark); }

.section-head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 72px); }
.kicker, .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--mauve); margin-bottom: 18px;
}
/* tiny level-meter mark before each kicker — echoes the logo */
.kicker::before {
  content: ""; width: 22px; height: 12px; flex: none;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 4px 5px,
    linear-gradient(currentColor, currentColor) 6px 100% / 4px 12px,
    linear-gradient(currentColor, currentColor) 12px 100% / 4px 8px,
    linear-gradient(currentColor, currentColor) 18px 100% / 4px 3px;
  background-repeat: no-repeat;
}
.section-plum .kicker, .section-charcoal .kicker { color: var(--sage); }

.section-title { font-size: clamp(2rem, 4.4vw, 3.25rem); }
.section-lead { margin-top: 20px; font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.section-plum .section-lead, .section-charcoal .section-lead { color: var(--on-dark-soft); }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-plum { background: var(--plum); color: var(--ivory); }
.btn-plum:hover { background: var(--plum-2); }
.btn-outline { border-color: var(--plum); color: var(--plum); }
.btn-outline:hover { background: var(--plum); color: var(--ivory); }
.btn-sage { background: var(--sage); color: var(--plum); }
.btn-sage:hover { background: var(--sage-soft); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- 5. Placeholders (shown only while showPlaceholders is true) ---------- */
.ph {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border: 1.5px dashed currentColor; border-radius: 6px;
  font: 600 .78rem/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .02em;
  color: var(--mauve); background: rgba(128, 96, 120, .06);
}
.section-plum .ph, .section-charcoal .ph { color: var(--sage); background: rgba(191, 201, 154, .06); }
.ph-box {
  display: grid; place-content: center; gap: 10px; text-align: center; padding: 24px;
  border: 2px dashed currentColor; border-radius: var(--radius);
  font: 600 .85rem/1.4 ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- 6. Nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  transition: background-color .25s, box-shadow .25s;
}
.site-header.is-scrolled, .site-header.is-open {
  background: rgba(243, 240, 232, .94);
  box-shadow: 0 1px 0 rgba(50, 19, 45, .1);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header.is-scrolled { background: rgba(243, 240, 232, .8); backdrop-filter: blur(12px); }
}
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo img { width: clamp(150px, 16vw, 190px); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--ink);
  transition: background-color .2s;
}
.nav-links a:not(.btn):hover { background: rgba(50, 19, 45, .07); }
.nav-links a.is-active:not(.btn) { background: rgba(50, 19, 45, .1); }
.nav-cta-item { margin-left: 10px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 11px 9px;
  background: none; border: 0; cursor: pointer; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--plum); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; background: var(--ivory);
    border-bottom: 1px solid rgba(50, 19, 45, .12); box-shadow: 0 20px 30px -20px rgba(50, 19, 45, .3);
  }
  .site-header.is-open .nav-links { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid rgba(50, 19, 45, .1); font-size: 1.05rem; }
  .nav-links a.is-active:not(.btn) { background: none; color: var(--mauve); }
  .nav-cta-item { margin: 18px 0 0; }
  .nav-cta-item .btn { width: 100%; min-height: 50px; }
}

/* ---------- 7. Hero ---------- */
.hero {
  background: var(--sage); color: var(--plum);
  padding: calc(var(--header-h) + clamp(40px, 6vw, 88px)) 0 clamp(72px, 9vw, 120px);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero-text { min-width: 0; }
.hero .eyebrow { color: var(--plum); opacity: .8; font-size: .78rem; letter-spacing: .12em; }
/* Sized so the longest line ("Our Collaboration." ≈ 11.3em wide incl. its
   highlight) always fits its column on one line, with a small safety
   margin. If you change the headline wording, these numbers may need
   adjusting. */
.hero-title {
  font-size: clamp(1.5rem, 3.85vw, 3.3rem); font-weight: 700; line-height: 1.06;
  letter-spacing: -0.02em; margin-bottom: 28px;
}
@media (max-width: 900px) { .hero-title { font-size: clamp(1.5rem, 7.6vw, 3.3rem); } }
.hero-title span { display: block; }
/* last line ("Our Collaboration.") gets an ivory highlighter stroke */
.hero-title span:last-child em {
  font-style: normal;
  background: linear-gradient(transparent 58%, rgba(243, 240, 232, .85) 58% 90%, transparent 90%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 .08em;
}
.hero-lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 52ch; margin-bottom: 36px; color: #3E2A3A; }

/* Record sleeve + vinyl */
.hero-art { position: relative; width: min(88%, 420px); justify-self: start; }
.sleeve {
  position: relative; z-index: 2; width: 100%; aspect-ratio: 1;
  border-radius: 6px; box-shadow: 0 34px 60px -28px rgba(33, 31, 34, .65), 0 2px 0 rgba(255,255,255,.08) inset;
}
.vinyl {
  position: absolute; z-index: 1; inset: 3% 3% 3% 3%; border-radius: 50%;
  background:
    radial-gradient(circle, #1A181B 0 2.2%, var(--sage) 2.2% 16%, var(--plum) 16% 17%, transparent 17%),
    conic-gradient(from 30deg, transparent 0 8%, rgba(255,255,255,.07) 12%, transparent 18% 50%, rgba(255,255,255,.07) 62%, transparent 68%),
    repeating-radial-gradient(circle, #1E1C1F 0 1.5px, #262428 1.5px 3px);
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .6);
  transform: translateX(34%);
}
.js .vinyl { transform: translateX(0); animation: vinyl-out 1.3s cubic-bezier(.2,.7,.2,1) .35s forwards; }
@keyframes vinyl-out { to { transform: translateX(34%); } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { width: min(78%, 400px); justify-self: start; margin: 8px 0 0; }
}

/* ---------- 8. Services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  display: flex; flex-direction: column; gap: 14px; height: 100%;
  padding: 32px 28px 28px; background: var(--paper);
  border: 1px solid rgba(50, 19, 45, .1); border-radius: var(--radius);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(50, 19, 45, .2); }
.service-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--sage-soft); color: var(--plum); margin-bottom: 6px;
  transition: background-color .25s;
}
.service-card:hover .service-icon { background: var(--sage); }
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 { font-size: 1.15rem; }
.service-card p { color: var(--ink-soft); font-size: 1rem; flex: 1; }
.service-link {
  align-self: flex-start; margin-top: 6px; font-weight: 700; font-size: .95rem; color: var(--plum);
  text-decoration: none; border-bottom: 2px solid var(--sage); padding-bottom: 2px;
  transition: border-color .2s;
}
.service-link:hover { border-color: var(--plum); }
.service-link span { display: inline-block; transition: transform .2s; }
.service-link:hover span { transform: translateX(3px); }

.service-card-cta { background: var(--plum); color: var(--on-dark); border-color: var(--plum); justify-content: center; }
.service-card-cta p { color: var(--on-dark-soft); flex: 0; }
.service-card-cta .btn { align-self: flex-start; margin-top: 8px; }

@media (max-width: 980px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .service-grid { grid-template-columns: 1fr; } }

/* ---------- 9. Work ---------- */
.listen-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; align-items: stretch; }
.spotify-wrap { border-radius: var(--radius); overflow: hidden; background: var(--plum-2); min-height: 352px; }
.spotify-wrap iframe { width: 100%; height: 100%; min-height: 352px; border: 0; }
.listen-side { display: grid; gap: 24px; grid-template-rows: 1fr auto; }
.side-card { background: var(--plum-2); border: 1px solid var(--plum-3); border-radius: var(--radius); padding: 28px; }
.side-card h3 { font-size: 1.05rem; margin-bottom: 14px; }
.side-card p { color: var(--on-dark-soft); margin-bottom: 20px; }
.side-card-cta { background: var(--sage); color: var(--plum); border-color: var(--sage); }
.side-card-cta p { color: #3E2A3A; }
.side-card-cta .btn-sage { background: var(--plum); color: var(--ivory); }
.side-card-cta .btn-sage:hover { background: var(--plum-2); }
.collab-list { display: flex; flex-wrap: wrap; gap: 8px; }
.collab-list li:not(.ph-li) {
  padding: 6px 14px; border-radius: 999px; background: rgba(191, 201, 154, .12);
  border: 1px solid rgba(191, 201, 154, .3); font-weight: 600; font-size: .92rem;
}

.videos-block { margin-top: clamp(56px, 7vw, 88px); }
.block-title { font-size: 1.35rem; margin-bottom: 24px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 22px; }
.video-card { background: var(--plum-2); border: 1px solid var(--plum-3); border-radius: var(--radius); overflow: hidden; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #24101F; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame .ph-box { position: absolute; inset: 12px; color: var(--sage); }
.video-body { padding: 18px 20px 22px; }
.video-body h4 { margin: 0; font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
.video-body p { color: var(--on-dark-soft); font-size: .95rem; margin-top: 6px; }

@media (max-width: 900px) {
  .listen-grid { grid-template-columns: 1fr; }
  .listen-side { grid-template-rows: none; }
}

/* ---------- 10. About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.about-media > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-media .logo-card img { width: 100%; height: auto; }
.about-media .ph-box { aspect-ratio: 4 / 3; color: var(--mauve); background: var(--paper); }
.about-media .logo-card {
  aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--sage);
  display: grid; place-items: center; padding: 12%;
}
.about-text .section-title { margin-bottom: 26px; }
.prose { display: grid; gap: 16px; color: var(--ink-soft); }
.prose p:first-child { font-size: 1.25rem; color: var(--ink); font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 34px 0 0; }
.stats > div { padding: 20px 22px; border-radius: var(--radius-sm); background: var(--sage-soft); }
.stats dt { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.stats dd { margin: 4px 0 0; color: var(--ink-soft); font-size: .95rem; }
.team { margin-top: 28px; }
.team h3 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mauve); margin-bottom: 12px; font-weight: 700; }
.team ul { display: flex; flex-wrap: wrap; gap: 10px; }
.team li:not(.ph-li) { padding: 8px 14px; border: 1px solid rgba(50, 19, 45, .15); border-radius: var(--radius-sm); }
.team li strong { display: block; font-size: .98rem; }
.team li span { font-size: .85rem; color: var(--ink-soft); }

@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr; } }

/* ---------- 11. Approach ---------- */
.approach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.approach-card {
  position: relative; padding: 30px 26px 30px; border-radius: var(--radius);
  background: var(--ivory); border-top: 4px solid var(--plum);
}
.approach-num { font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--mauve); }
.approach-card h3 { font-size: 1.2rem; margin: 18px 0 12px; }
.approach-card p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 980px) { .approach-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .approach-grid { grid-template-columns: 1fr; } }

/* ---------- 12. Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.contact-list { display: grid; gap: 14px; margin-top: 36px; }
.contact-list li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; }
.label-sm { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sage); }
.contact-list a { font-weight: 600; text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--sage); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.socials a {
  padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(191, 201, 154, .4);
  text-decoration: none; font-weight: 600; font-size: .92rem; transition: background-color .2s, color .2s;
}
.socials a:hover { background: var(--sage); color: var(--plum); }
.good-to-know { margin-top: 36px; padding-top: 28px; border-top: 1px solid rgba(243, 240, 232, .12); }
.good-to-know:empty { display: none; }
.good-to-know h3 { font-size: 1rem; margin-bottom: 16px; }
.good-to-know dl { display: grid; gap: 12px; margin: 0; }
.good-to-know dl > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.good-to-know dd { margin: 0; color: var(--on-dark-soft); }

.contact-form {
  background: var(--ivory); color: var(--ink);
  border-radius: calc(var(--radius) + 4px); padding: clamp(24px, 4vw, 44px);
  display: grid; gap: 20px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-weight: 600; font-size: .95rem; }
.req { color: var(--mauve); }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; background: var(--paper);
  border: 1.5px solid #D8D2C6; border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field ::placeholder { color: #8F8590; }
.field select {
  appearance: none; padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, var(--plum) 50%), linear-gradient(135deg, var(--plum) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--plum); box-shadow: 0 0 0 4px rgba(191, 201, 154, .7);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: .875rem; font-weight: 600; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.form-status { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 500; font-size: .97rem; }
.form-status.is-info { background: var(--sage-soft); border-left: 4px solid var(--plum); }
.form-status.is-success { background: #E3EDD9; border-left: 4px solid #4C6B2F; }
.form-status.is-error { background: #F7E2DF; border-left: 4px solid var(--error); }
.form-status a { font-weight: 700; }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- 13. Footer ---------- */
.site-footer { background: var(--plum); color: var(--on-dark-soft); padding: 64px 0 40px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 28px 48px; align-items: center; }
.footer-logo img { width: 170px; }
.footer-links, .footer-social { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links { justify-content: center; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--sage); }
.copyright { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--plum-3); font-size: .85rem; }
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

/* ---------- 14. Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .vinyl { transform: translateX(34%); }
}
