/* components.css — reusable UI */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-pill); font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .18s var(--ease), background .2s, box-shadow .25s var(--ease), border-color .2s, color .2s;
}
.btn .arrow-ico { transition: transform .25s var(--ease); }
.btn:hover .arrow-ico { transform: translateX(4px); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(34,34,59,.5); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Buttons on dark surfaces */
.section-ink .btn-primary, .contact-box .btn-primary { background: var(--rose); color: var(--ink); }
.section-ink .btn-primary:hover, .contact-box .btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(201,173,167,.55); }
.section-ink .btn-ghost, .contact-box .btn-ghost { color: var(--cream); border-color: rgba(242,233,228,.32); }
.section-ink .btn-ghost:hover, .contact-box .btn-ghost:hover { border-color: var(--rose); color: var(--rose); }

/* ---------- Hero ---------- */
.hero { padding: 0; overflow: hidden; position: relative; }
.hero::before {           /* soft warm dawn glow */
  content: ""; position: absolute; top: -10%; right: -5%;
  width: min(720px, 90vw); height: min(720px, 90vw);
  background: radial-gradient(circle, var(--warm-wash) 0%, rgba(246,227,216,0) 65%);
  opacity: .8; pointer-events: none; z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px);
  align-items: center; min-height: calc(100vh - var(--nav-h));
  padding: clamp(48px, 8vw, 80px) clamp(20px, 5vw, 40px);
}
.hero-text { align-self: center; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-role {
  display: inline-flex; align-items: center; gap: 9px;
  margin-bottom: 20px; font-size: 14px; font-weight: 500; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 15px 7px 12px; border-radius: var(--radius-pill); box-shadow: var(--shadow-sm);
}
.hero-role .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 4px rgba(201,173,167,.25); }
.hero .lead { color: var(--muted); max-width: 32em; }
.hero .cta-row { margin-top: clamp(28px, 4vw, 36px); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-photo { display: flex; align-items: center; justify-content: center; position: relative; }
.hero-photo img {
  width: 100%; max-width: 440px; aspect-ratio: 4 / 5;
  object-fit: cover; object-position: top center;
  border-radius: var(--radius-lg);
  border: 6px solid var(--surface);
  box-shadow: var(--shadow-lift);
}
/* ---------- Section heading block ---------- */
.section-head { max-width: 640px; margin-bottom: clamp(28px, 5vw, 44px); }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat .num { font-family: var(--font-display); font-size: clamp(30px, 5vw, 40px); line-height: 1; letter-spacing: -0.02em; color: var(--accent); }
.stat .label { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.45; }

/* ---------- Project cards ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 8px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .28s var(--ease), box-shadow .3s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: var(--rose); }
.card-thumb {
  aspect-ratio: 16 / 9; width: 100%; overflow: hidden;
  background: linear-gradient(135deg, var(--slate), var(--mauve));
  display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.card .tag {
  align-self: flex-start; font-size: 11.5px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: .1em; background: var(--accent-soft);
  padding: 5px 12px; border-radius: var(--radius-pill);
}
.card h3 { margin: 14px 0 8px; font-size: 22px; }
.card p { color: var(--muted); font-size: 15.5px; flex: 1; }
.card .arrow { margin-top: 18px; font-weight: 600; font-size: 14.5px; color: var(--accent); display: inline-flex; align-items: center; gap: 7px; }
.card .arrow .arrow-ico { transition: transform .25s var(--ease); }
.card:hover .arrow .arrow-ico { transform: translateX(4px); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 22px; max-width: none; }
.about-lead { font-size: clamp(17px, 2.2vw, 19px); line-height: 1.6; color: #3a3747; max-width: 820px; }
.think-list, .tl-hint { max-width: 820px; }
.skill-group { margin-top: 14px; }
.skill-group > strong {
  display: block; margin-bottom: 12px; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
}
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 7px 15px; font-size: 13.5px; color: var(--slate);
  transition: transform .18s var(--ease), border-color .18s, color .18s;
}
.chip:hover { transform: translateY(-2px); border-color: var(--rose); color: var(--accent); }

/* About — compact experience list */
.mini-list { list-style: none; }
.mini-list li {
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); margin-top: 10px; box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.mini-list li:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mini-list .ml-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mini-list .ml-role { font-weight: 600; font-size: 16px; color: var(--text); }
.mini-list .ml-role span { color: var(--accent); font-weight: 600; }
.mini-list .ml-date { font-size: 13px; color: var(--faint); white-space: nowrap; }
.mini-list .ml-desc { font-size: 14.5px; color: var(--muted); margin-top: 5px; }

/* ---------- About — interactive timeline ---------- */
.tl-hint { font-size: 13px; color: var(--faint); margin: -6px 0 14px; }
.timeline { position: relative; }
.tl-scroll {
  position: relative; overflow-x: auto; overflow-y: hidden;
  padding: 4px 2px 14px; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.tl-rail {
  position: absolute; top: 9px; left: 10px; right: 10px; height: 2px;
  background: var(--line-strong); border-radius: 2px;
}
.tl-rail-fill {
  display: block; height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--rose), var(--accent));
  transition: width 1.1s var(--ease);
}
.timeline.in .tl-rail-fill { width: 100%; }

.tl-items { display: flex; gap: 0; position: relative; min-width: max-content; }
.tl-item {
  position: relative; flex: 0 0 auto; width: clamp(150px, 20vw, 200px);
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 0 16px 0 0; text-align: left; background: none; border: none;
  cursor: pointer; font: inherit; color: inherit; scroll-snap-align: start;
  opacity: .55; transition: opacity .3s var(--ease);
}
.tl-item:hover, .tl-item.is-active { opacity: 1; }
.tl-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
  margin-bottom: 16px; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.tl-item:hover .tl-dot { transform: scale(1.15); border-color: var(--rose); }
.tl-item.is-active .tl-dot {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(74,78,105,.14); transform: scale(1.15);
}
.tl-year { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--accent); text-transform: uppercase; }
.tl-title { font-weight: 600; font-size: 15.5px; color: var(--text); margin-top: 5px; }
.tl-place { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.tl-desc {
  font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 0;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .4s var(--ease), opacity .35s var(--ease), margin-top .35s var(--ease);
}
.tl-item.is-active .tl-desc { max-height: 160px; opacity: 1; margin-top: 9px; }

/* ---------- About — numbered product beliefs ---------- */
.think-list { list-style: none; counter-reset: think; display: grid; gap: 14px; }
.think-list li {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.think-list li:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--rose); }
.think-list .tn {
  font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--rose);
  flex: 0 0 auto; min-width: 1.4em;
}
.think-list .tn-body h4 { font-size: 16px; font-weight: 600; color: var(--text); }
.think-list .tn-body p { font-size: 14.5px; color: var(--muted); margin-top: 6px; }

/* ---------- About — tools & skills marquee ---------- */
.marquee {
  position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track {
  display: flex; gap: 9px; width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.beyond-row { margin-top: 30px; }

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
  .timeline .tl-rail-fill { width: 100%; }
}

/* ---------- Contact ---------- */
.contact-box {
  background: var(--ink); color: var(--cream); border-radius: var(--radius-lg);
  padding: clamp(40px, 7vw, 72px) clamp(28px, 5vw, 48px); text-align: center;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.contact-box::before {
  content: ""; position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px; pointer-events: none;
  background: radial-gradient(circle, rgba(201,173,167,.22) 0%, rgba(201,173,167,0) 60%);
}
.contact-box > * { position: relative; z-index: 1; }
.contact-box h2 { color: var(--cream); }
.contact-box .eyebrow { color: var(--rose); }
.contact-box p { color: #cdc4bf; }
.contact-links { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Case study pages ---------- */
.case-hero { padding: clamp(32px, 6vw, 56px) 0 clamp(20px, 3vw, 30px); position: relative; overflow: hidden; }
.case-hero::before {
  content: ""; position: absolute; top: -30%; right: -10%; width: 560px; height: 560px; pointer-events: none;
  background: radial-gradient(circle, var(--warm-wash) 0%, rgba(246,227,216,0) 65%); opacity: .7;
}
.case-hero .wrap { position: relative; z-index: 1; }
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500;
  transition: gap .2s var(--ease), color .15s;
}
.back-link:hover { color: var(--accent); gap: 11px; }
.case-body { padding: 10px 0 90px; }
/* full-width elements span the container; prose keeps a readable measure, left-aligned */
.case-body p, .case-body ul { max-width: 820px; }
.case-body h2 { margin-top: 52px; }
.case-body h3 { margin-top: 34px; }
.case-body p { margin-top: 14px; line-height: 1.7; }
.case-body ul { margin: 14px 0 0 4px; list-style: none; }
.case-body li { margin: 12px 0; padding-left: 26px; position: relative; line-height: 1.6; }
.case-body li::before {
  content: ""; position: absolute; left: 4px; top: 11px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--rose);
}
.tldr {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--rose);
  border-radius: var(--radius); padding: 26px 28px; margin-top: 28px; box-shadow: var(--shadow-sm);
}
.tldr strong { color: var(--slate); }
.meta-row { display: flex; gap: clamp(20px, 4vw, 36px); flex-wrap: wrap; margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.meta-row .item .k { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.meta-row .item .v { font-weight: 600; margin-top: 4px; }

/* ---------- Flow (user journey) ---------- */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.flow .step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--slate); box-shadow: var(--shadow-sm);
}
.flow .sep { color: var(--rose); font-weight: 700; }

/* ---------- Case study visuals ---------- */
.case-banner { margin: 30px 0 8px; }
.case-banner img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; box-shadow: var(--shadow-sm); }

/* large media attachment block (dashboard / demo) */
.case-media {
  position: relative; margin: 30px 0 8px; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--slate), var(--mauve));
  display: flex; align-items: center; justify-content: center;
}
.case-media .ph {
  color: var(--cream); font-size: 13.5px; letter-spacing: .04em;
  text-align: center; padding: 24px; opacity: .92; max-width: 36ch; line-height: 1.5;
}
.case-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.case-media.is-tall { aspect-ratio: 21 / 9; }

/* inline link row in case hero */
.case-links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px; }
.case-links a {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 15px;
  color: var(--accent); text-decoration: none;
}
.case-links a:hover { text-decoration: underline; }
.figure { margin-top: 24px; }
.figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.figure figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; text-align: center; }
.beforeafter { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.beforeafter figure { margin: 0; }
.beforeafter img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; aspect-ratio: 4/5; object-fit: cover; }
.beforeafter figcaption { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 8px; text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.gallery img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block;
  aspect-ratio: 1/1; object-fit: cover; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease);
}
.gallery img:hover { transform: scale(1.02); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; min-height: 0; padding: 40px 24px 64px; text-align: left; }
  .hero-photo { order: -1; justify-content: flex-start; }
  .hero-photo img { max-width: 300px; }
  .hero-badge { left: auto; right: -4px; }
  .cards { grid-template-columns: 1fr; }
  .pm-points { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .beforeafter { grid-template-columns: 1fr; }
}
