/* ============================================================
   Fragment Labs — "Apple, but dark" preview skin
   Same markup as production; only this stylesheet differs.
   ============================================================ */

:root {
  --bg: #000000;
  --bg-raised: #0b0b0d;
  --bg-card: #1d1d1f;
  --text: #f5f5f7;
  --text-dim: #86868b;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #2997ff;
  --accent: #ff5c39;            /* Fragment orange survives only in the brand mark */
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", "Inter", system-ui, sans-serif;
  --container: 1024px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }

h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.015em; }

.eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.lede {
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--text-dim);
  font-weight: 400;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

section { padding: 65px 0; }

/* ---------- Header: frosted glass ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(22, 22, 23, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: none;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }

.brand-logo { height: 18px; width: auto; opacity: 0.92; }

.site-nav { display: flex; align-items: center; gap: 34px; }

.site-nav a {
  color: rgba(245, 245, 247, 0.8);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: color 0.25s;
}

.site-nav a:hover { color: var(--text); }

.nav-cta {
  background: var(--blue);
  color: #fff !important;
  border: none;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem !important;
  transition: background 0.25s;
}

.nav-cta:hover { background: var(--blue-hover); }

.nav-toggle { display: none; }

/* ---------- Hero: big, centered, quiet ---------- */
.hero {
  position: relative;
  padding: 80px 0 70px;
  text-align: center;
  overflow: hidden;
}

.hero-grid { display: none; }   /* no texture — Apple keeps the void empty */

.hero-logo {
  display: block;
  width: 343px;
  max-width: 82%;
  height: auto;
  margin: 0 auto 34px;
}

.hero .eyebrow { font-size: 1.05rem; }

.hero h1 {
  font-size: clamp(3rem, 7.5vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 960px;
  margin: 0 auto 28px;
  background: linear-gradient(180deg, #ffffff 0%, #a5a5ab 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 em { font-style: normal; -webkit-text-fill-color: transparent; }

.hero .lede { margin-bottom: 44px; }

.hero-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons: Apple pills ---------- */
.btn {
  display: inline-block;
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s;
}

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }

.btn-ghost { color: var(--link); border: 1px solid var(--link); }
.btn-ghost:hover { background: var(--link); color: #000; }

.btn-lg { padding: 16px 34px; font-size: 1.15rem; }

/* ---------- Clients strip ---------- */
.clients { padding: 35px 0; background: var(--bg); border: none; }

.clients-label {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 26px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.client-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 54px;
}

.client-list li {
  font-size: 1.1rem;
  font-weight: 600;
  color: #6e6e73;
  letter-spacing: -0.015em;
}

/* ---------- Pitch: centered statement ---------- */
.pitch { background: var(--bg); text-align: center; }

.pitch-grid { display: block; }

.pitch h2 { max-width: 820px; margin: 0 auto 30px; }

.pitch-copy { max-width: 640px; margin: 0 auto; }
.pitch-copy p { color: var(--text-dim); font-size: 1.15rem; }
.pitch-copy p + p { margin-top: 18px; }

/* ---------- Services: borderless rounded tiles ---------- */
.services { background: var(--bg); border: none; }

.services .eyebrow, .services h2 { text-align: center; }
.services h2 { margin: 0 auto 60px; max-width: 720px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  padding: 36px 30px;
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1);
}

.card:hover { transform: scale(1.015); border: none; }

.card-num {
  font-weight: 600;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-bottom: 18px;
}

.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.55; }

/* ---------- Process ---------- */
.process { background: var(--bg-raised); border-radius: 30px; margin: 0 18px; }

.process .eyebrow, .process h2 { text-align: center; }
.process h2 { margin: 0 auto 70px; max-width: 700px; }

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: none;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 20px;
}

.step h3 { margin-bottom: 10px; }
.step p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- About ---------- */
.about { background: var(--bg); border: none; text-align: center; }

.about-grid { display: block; }
.about-grid h2 { max-width: 760px; margin: 0 auto 30px; }
.about-copy { max-width: 640px; margin: 0 auto; }
.about-copy p { color: var(--text-dim); font-size: 1.15rem; }
.about-copy p + p { margin-top: 18px; }

/* ---------- Contact ---------- */
.contact { text-align: center; padding: 75px 0; border: none; }

.contact h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  background: linear-gradient(180deg, #ffffff 0%, #a5a5ab 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact .lede { margin: 18px auto 48px; }

.contact-form {
  max-width: 580px;
  margin: 0 auto 40px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.contact-form label { display: flex; flex-direction: column; gap: 8px; }

.contact-form label span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
}

.contact-form input,
.contact-form textarea {
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 15px 17px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.05rem;
  transition: border-color 0.25s, background 0.25s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #232326;
}

.contact-form textarea { resize: vertical; }
.contact-form button { align-self: center; margin-top: 10px; border: none; cursor: pointer; }

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.form-status { min-height: 1.5em; text-align: center; color: var(--text-dim); }
.form-status.ok { color: #30d158; }
.form-status.err { color: #ff6961; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid #1d1d1f;
  padding: 26px 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 26px; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Case-study pages ---------- */
.page-hero { padding: 65px 0 40px; text-align: center; }

.page-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #a5a5ab 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.crumb { color: var(--link); text-decoration: none; }
.crumb:hover { text-decoration: underline; }

.cs-list { padding-top: 40px; }

.cs-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--text); }

.cs-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: -0.01em;
}

.cs-more { margin-top: auto; font-weight: 500; font-size: 0.95rem; color: var(--link); }

.cs-card-cta .btn { align-self: flex-start; margin-top: auto; }

.cs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  padding-top: 40px;
  padding-bottom: 40px;
  text-align: left;
}

.cs-meta dl {
  position: sticky;
  top: 90px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  padding: 26px;
}

.cs-meta dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 18px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cs-meta dt:first-child { margin-top: 0; }
.cs-meta dd { color: var(--text); margin-top: 4px; }
.cs-meta a { color: var(--link); text-decoration: none; }

.cs-body h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.cs-body h2:first-child { margin-top: 0; }
.cs-body p { color: var(--text-dim); font-size: 1.05rem; }
.cs-body p + p { margin-top: 14px; }

.cs-next { border-top: 1px solid #1d1d1f; padding: 48px 0 90px; margin-top: 40px; }
.cs-next .container { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

.site-nav a.active { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  section { padding: 45px 0; }
  .card-grid, .steps { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .cs-layout { grid-template-columns: 1fr; gap: 32px; }
  .cs-meta dl { position: static; }
  .desktop-br { display: none; }
}

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

  .site-nav {
    display: none;
    position: absolute;
    top: 48px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(22, 22, 23, 0.97);
    backdrop-filter: blur(20px);
    padding: 22px;
    gap: 18px;
  }

  .site-nav.open { display: flex; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }

  .nav-toggle span { width: 20px; height: 1.5px; background: var(--text); display: block; }

  .hero { padding: 50px 0 80px; }
}
