/* =========================================================
   Yarn IBRAHIM ORIGINAL MOBILE SHOP — Serekunda mobile mechanic
   Palette: bleached cream + oxblood + navy
   Type:    JetBrains Mono body / Fraunces display
   Layout:  full-bleed photography, minimal chrome
   ========================================================= */

:root {
  --bg:        #f4ecdc;
  --bg-deep:   #ebe0c9;
  --ink:       #1a1b2e;
  --ink-soft:  #4a4a5c;
  --accent:    #6b1f1a;
  --secondary: #1e2a4a;
  --rule:      rgba(26, 27, 46, 0.16);
  --rule-soft: rgba(26, 27, 46, 0.09);
  --chip-bg:   rgba(30, 42, 74, 0.07);
  --shadow:    0 1px 0 rgba(26, 27, 46, 0.06);

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Fraunces', 'Playfair Display', Georgia, serif;

  --gutter: clamp(1.15rem, 5vw, 4.5rem);
  --measure: 62ch;
}

html[data-theme="dark"] {
  --bg:        #14151f;
  --bg-deep:   #1b1d2a;
  --ink:       #ece3d2;
  --ink-soft:  #a9a396;
  --accent:    #d98b7c;
  --secondary: #9fb0d8;
  --rule:      rgba(236, 227, 210, 0.20);
  --rule-soft: rgba(236, 227, 210, 0.10);
  --chip-bg:   rgba(236, 227, 210, 0.08);
  --shadow:    0 1px 0 rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg:        #14151f;
    --bg-deep:   #1b1d2a;
    --ink:       #ece3d2;
    --ink-soft:  #a9a396;
    --accent:    #d98b7c;
    --secondary: #9fb0d8;
    --rule:      rgba(236, 227, 210, 0.20);
    --rule-soft: rgba(236, 227, 210, 0.10);
    --chip-bg:   rgba(236, 227, 210, 0.08);
    --shadow:    0 1px 0 rgba(0, 0, 0, 0.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(0.94rem, 0.9rem + 0.2vw, 1.02rem);
  line-height: 1.72;
  font-weight: 400;
  letter-spacing: -0.005em;
  text-wrap: pretty;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.22em; }
a:hover { color: var(--secondary); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 0.7rem 1rem; z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- shared type ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0; }

h1 {
  font-size: clamp(2.15rem, 1.3rem + 4.6vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 120;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 1.1rem + 2.3vw, 2.9rem);
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 72;
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.08rem, 1rem + 0.5vw, 1.32rem);
  letter-spacing: -0.01em;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

.section-head {
  max-width: var(--measure);
  padding: 0 var(--gutter);
  margin: 0 auto clamp(2rem, 5vw, 3.6rem);
}

.section-intro { color: var(--ink-soft); margin-top: 1.1rem; }

/* ---------- buttons ---------- */

.btn-primary {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: var(--accent);
  padding: 0.95rem 1.6rem;
  min-height: 44px;
  border: 1px solid var(--accent);
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--bg);
}

.text-link {
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.text-link:hover { border-color: var(--accent); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--rule-soft);
}

.wordmark {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.35;
}
.wordmark span { display: block; color: var(--ink-soft); font-weight: 400; letter-spacing: 0.1em; }

.topnav {
  display: flex;
  gap: 1.3rem;
  margin-left: auto;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topnav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.55rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.topnav a:hover { color: var(--accent); border-color: var(--accent); }

.topbar-right { display: flex; align-items: center; gap: 0.6rem; }

.phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink);
  background: var(--chip-bg);
  border: 1px solid var(--rule);
  padding: 0.62rem 0.95rem;
  min-height: 44px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.phone-chip:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.phone-chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.phone-chip:hover .dot { background: var(--bg); }

.theme-toggle {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover { background: var(--chip-bg); border-color: var(--accent); color: var(--accent); }

/* ---------- hero ---------- */

.hero { padding-bottom: clamp(2.4rem, 6vw, 4.5rem); }

.hero-media img {
  width: 100%;
  height: clamp(260px, 52vw, 620px);
  object-fit: cover;
  object-position: center 42%;
}

.hero-copy {
  max-width: 74ch;
  padding: clamp(1.6rem, 4vw, 3rem) var(--gutter) 0;
  margin: 0 auto;
}

.hero-copy h1 { margin-bottom: 1.15rem; }

.lede {
  font-size: clamp(0.98rem, 0.94rem + 0.3vw, 1.1rem);
  color: var(--ink-soft);
  max-width: 60ch;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

.hero-note {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

/* ---------- marquee strip ---------- */

.strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-deep);
  overflow: hidden;
  padding: 0.85rem 0;
}

.strip-track {
  display: flex;
  gap: 1.4rem;
  width: max-content;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  animation: strip-scroll 46s linear infinite;
}
.strip-track span:nth-child(even) { color: var(--accent); }

@keyframes strip-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- services ---------- */

.services { padding: clamp(3rem, 8vw, 6rem) 0; }

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.service {
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.5rem, 3.5vw, 2.4rem) var(--gutter);
  display: grid;
  gap: 0.7rem;
  transition: background-color 0.25s ease;
}
.service:hover { background: var(--bg-deep); }

.service-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0;
}

.service h3 { margin: 0; }

.service p { color: var(--ink-soft); max-width: 68ch; }

.service-meta {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink) !important;
  border-top: 1px solid var(--rule-soft);
  padding-top: 0.7rem;
  margin-top: 0.2rem;
}

/* ---------- gallery (full-bleed) ---------- */

.gallery { display: grid; gap: 0; }

.gallery figure { margin: 0; position: relative; }

.gallery img {
  width: 100%;
  height: clamp(240px, 46vw, 560px);
  object-fit: cover;
}

.gallery figcaption {
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--ink-soft);
  padding: 0.85rem var(--gutter) 0;
  max-width: 62ch;
}

.gallery .bleed { margin-bottom: clamp(2rem, 5vw, 3.4rem); }

.gallery .pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: clamp(2rem, 5vw, 3.4rem);
}

/* ---------- call-out ---------- */

.callout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: clamp(1rem, 4vw, 2rem);
  border-top: 1px solid var(--rule);
}

.callout-media img {
  width: 100%;
  height: clamp(240px, 44vw, 520px);
  object-fit: cover;
}

.callout-copy {
  padding: clamp(2rem, 5vw, 3.6rem) var(--gutter);
  max-width: 74ch;
}

.callout-copy p { color: var(--ink-soft); }

.callout-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule-soft);
}
.callout-list li {
  border-bottom: 1px solid var(--rule-soft);
  padding: 0.85rem 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.callout-list strong { color: var(--ink); font-weight: 700; }

.callout-cta { margin-top: 1.8rem; }

/* ---------- visit ---------- */

.visit {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.visit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  padding: 0 var(--gutter);
  max-width: 1180px;
  margin: 0 auto;
}

.visit-block h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
}

.visit-block address {
  font-style: normal;
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 1rem;
}

.visit-hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}

.big-phone { margin: 0 0 0.2rem; }
.big-phone a {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.2s ease;
}
.big-phone a:hover { color: var(--accent); }

.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.hours th, .hours td {
  text-align: left;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-weight: 400;
}
.hours th { color: var(--ink-soft); }
.hours td { text-align: right; color: var(--ink); white-space: nowrap; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }

/* ---------- about ---------- */

.about { padding: clamp(3rem, 8vw, 6rem) 0; }

.about-inner {
  max-width: 68ch;
  padding: 0 var(--gutter);
  margin: 0 auto;
}
.about-inner p { color: var(--ink-soft); }
.about-inner h2 { margin-bottom: 1.4rem; }

.about-sign {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink) !important;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}

/* ---------- closing ---------- */

.closing {
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter);
  text-align: center;
  border-top: 1px solid var(--rule);
}

.closing-line {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1rem + 2vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 26ch;
  margin: 0 auto 1.8rem;
  text-wrap: balance;
}

.closing-cta { margin-bottom: 1.2rem; }

.closing-note {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-deep);
  padding: clamp(2rem, 5vw, 3rem) var(--gutter) 4.5rem;
}

.footer-inner { max-width: 1180px; margin: 0 auto; }

.footer-name {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.footer-meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

.claim-banner {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--chip-bg);
  border: 1px solid var(--rule-soft);
  padding: 0.55rem 0.85rem;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.claim-banner:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: transparent;
}

.attribution {
  position: static;
  max-width: 1180px;
  margin: 1.6rem auto 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  opacity: 0.55;
  text-align: left;
}
.attribution a { color: inherit; }

/* ---------- scroll-linked labels (anchor positioning) ---------- */

@supports (anchor-name: --x) {
  .services h2 { anchor-name: --services-heading; }
  .visit h2    { anchor-name: --visit-heading; }

  .section-head::after {
    content: '↓';
    position: absolute;
    position-anchor: --services-heading;
    position-area: right span-block;
    margin-left: 1.2rem;
    font-size: 0.8rem;
    color: var(--accent);
    opacity: 0;
    animation: label-in linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 34%;
  }
  .section-head { position: relative; }
}

@keyframes label-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */

@media (min-width: 720px) {
  .service {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    align-items: start;
    column-gap: 1.6rem;
  }
  .service-num { grid-row: 1 / span 3; padding-top: 0.4rem; }
  .service h3, .service p, .service-meta { grid-column: 2; }

  .gallery .pair { grid-template-columns: 1fr 1fr; }
  .gallery .pair figcaption { padding-left: 0; padding-right: 2rem; }
  .gallery .pair figure:first-child figcaption { padding-left: var(--gutter); }

  .visit-grid { grid-template-columns: 1fr 1fr; }
  .hours-block { grid-column: 1 / -1; }
}

@media (min-width: 1000px) {
  .callout { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .callout-media img { height: 100%; min-height: 520px; }
  .callout-copy { padding: clamp(3rem, 5vw, 5rem) clamp(2rem, 4vw, 4.5rem); }

  .visit-grid { grid-template-columns: 1fr 1fr 1.2fr; }
  .hours-block { grid-column: auto; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip-track { animation: none; }
  .section-head::after { animation: none; opacity: 1; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
