/* =================================================================
   ClaudyApps Studio — mixed light/dark theme
   Light page (services/projects/process) + dark hero/contact/footer.
   Orange brand, gradients used sparingly (hero word + buttons only).
   ================================================================= */

:root {
  /* light surfaces (page) */
  --bg: #fdf9f4;          /* warm off-white */
  --surface: #ffffff;
  --surface-2: #f6efe6;   /* subtle cream tint */
  --border: rgba(28, 22, 16, 0.10);
  --border-strong: rgba(28, 22, 16, 0.16);
  --text: #1c1712;        /* warm near-black */
  --muted: #6b6258;
  --faint: #9a9088;

  /* dark surfaces (hero / contact / footer) */
  --dark-bg: #0c0a09;
  --dark-surface: #1a1613;
  --dark-surface-2: #221c17;
  --dark-border: rgba(255, 255, 255, 0.10);
  --dark-border-strong: rgba(255, 255, 255, 0.16);
  --dark-text: #f8f4ef;
  --dark-muted: #b3a89c;
  --dark-faint: #837a70;

  /* brand */
  --orange: #e55f03;
  --orange-bright: #ff7a1f;
  --orange-soft: rgba(229, 95, 3, 0.10);
  /* gradient kept ONLY for the hero highlight word + primary buttons */
  --grad: linear-gradient(115deg, #ff8a2b, #e55f03);

  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);

  --container: 1180px;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 22px 50px -26px rgba(28, 22, 16, 0.30);
  --shadow-dark: 0 30px 70px -25px rgba(0, 0, 0, 0.6);
  --shadow-orange: 0 18px 40px -16px rgba(229, 95, 3, 0.45);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; font-weight: 600; }
::selection { background: var(--orange); color: #fff; }

/* ---------- helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
section { padding-block: clamp(70px, 10vw, 130px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--orange); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(44px, 6vw, 70px); }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin-top: 16px; color: var(--text); }
.section-head p { color: var(--muted); margin-top: 16px; font-size: 1.05rem; }

/* italic serif accent on the hero highlight word — more editorial than a gradient */
.grad-text {
  font-family: 'Instrument Serif', var(--display);
  font-style: italic;
  font-weight: 400;
  color: var(--orange);
  letter-spacing: -0.01em;
  /* serifs tend to render visually smaller next to a geometric sans — nudge up */
  font-size: 1.05em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 0.96rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--grad); color: #fff; font-weight: 700; box-shadow: var(--shadow-orange); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 24px 50px -16px rgba(229, 95, 3, 0.6); }
/* ghost button: light by default (hero), dark inside the contact card */
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--orange); background: var(--orange-soft); }
.cta-card .btn-ghost { border-color: var(--dark-border-strong); color: var(--dark-text); }
.cta-card .btn-ghost:hover { border-color: var(--orange-bright); background: rgba(255, 255, 255, 0.06); }

/* ---------- nav (dark text over light hero; light glass on scroll) ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: 76px;
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}
.nav.scrolled, .nav.open {
  background: rgba(253, 249, 244, 0.85);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.18rem; color: var(--text); }
.logo .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px var(--orange-soft); animation: pulse 2.4s infinite; }
.logo b { color: var(--orange); }

.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 0.94rem; color: var(--muted); position: relative; transition: color .18s ease; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -7px; width: 0; height: 2px; border-radius: 2px; background: var(--orange); transition: width .22s ease; }
.nav-links a:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-cta { padding: 10px 20px; font-size: 0.88rem; }

.burger { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.burger span { width: 19px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .22s ease, opacity .22s ease; }
.nav.open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .burger span:nth-child(2) { opacity: 0; }
.nav.open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { position: fixed; top: 76px; inset-inline: 0; z-index: 99; display: flex; flex-direction: column; gap: 18px; padding: 22px 24px 30px; background: rgba(253, 249, 244, 0.97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { font-family: var(--display); font-size: 1.1rem; color: var(--text); }
.mobile-menu .btn { justify-content: center; }

/* ---------- hero (LIGHT, airy) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--bg); color: var(--text);
  padding-top: clamp(150px, 20vh, 210px); padding-bottom: clamp(80px, 10vw, 130px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(46% 42% at 88% -8%, rgba(229, 95, 3, 0.10), transparent 62%);
}
.hero-grid { position: relative; z-index: 1; display: block; max-width: 820px; margin-inline: auto; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 0.84rem; color: var(--muted); box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); margin-top: 26px; color: var(--text); }
.hero p.lead { color: var(--muted); font-size: 1.15rem; margin-top: 24px; max-width: 58ch; margin-inline: auto; }
.hero .buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; justify-content: center; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 42px; justify-content: center; }
.hero-trust span { font-size: 0.85rem; color: var(--faint); display: inline-flex; align-items: center; gap: 8px; }
.hero-trust span::before { content: "✓"; color: var(--orange); font-weight: 700; }

.hero-visual { display: none; }
.hero-visual .glow { position: absolute; inset: 0; background: radial-gradient(50% 50% at 60% 40%, rgba(229, 95, 3, 0.16), transparent 70%); filter: blur(20px); }
.preview { position: absolute; border-radius: 22px; overflow: hidden; border: 1px solid var(--border-strong); background: var(--surface); box-shadow: var(--shadow); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview--main { top: 30px; left: 8%; width: 64%; aspect-ratio: 4/5; transform: rotate(-4deg); z-index: 2; }
.preview--top { top: 0; right: 4%; width: 48%; aspect-ratio: 16/11; transform: rotate(5deg); z-index: 3; }
.preview--bottom { bottom: 6px; right: 8%; width: 52%; aspect-ratio: 16/12; transform: rotate(-3deg); z-index: 1; }
.float-chip { position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 14px; font-size: 0.82rem; font-weight: 600; color: var(--text); background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.float-chip--rating { top: 16px; left: -2%; }
.float-chip--rating b { color: var(--orange); }
.float-chip--ship { bottom: 20px; left: 2%; }
.float-chip .ic { font-size: 1rem; }

/* ---------- marquee (real project names, subtle motion) ---------- */
.marquee {
  overflow: hidden;
  padding-block: clamp(18px, 2.5vw, 28px);
  background: var(--bg);
}
/* tighten the space around the marquee: it acts as a transition strip,
   so the hero above and the following section don't need their full padding */
.hero:has(+ .marquee) { padding-bottom: clamp(40px, 5vw, 70px); }
.marquee + section { padding-top: clamp(40px, 5vw, 70px); }
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 45s linear infinite;
}
.marquee__row {
  display: flex;
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
  padding-right: clamp(40px, 5vw, 72px);
}
.marquee__row span {
  font-family: var(--display);
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.marquee__row span::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  margin-inline-start: clamp(40px, 5vw, 72px);
  opacity: 0.55;
  flex-shrink: 0;
}
@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- services (LIGHT) ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 26px; position: relative; overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.service::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.service:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.service:hover::before { transform: scaleX(1); }
.service .ic { width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 16px; background: var(--orange-soft); border: 1px solid var(--border); margin-bottom: 20px; }
.service h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--text); }
.service p { color: var(--muted); font-size: 0.92rem; }

/* ---------- projects (LIGHT) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.filter { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: all .18s ease; }
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.active { color: #fff; font-weight: 700; background: var(--orange); border-color: transparent; }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.project.hide { display: none; }
.project.is-link:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.project-media { position: relative; aspect-ratio: 16/11; overflow: hidden; background: var(--surface-2); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project.is-link:hover .project-media img { transform: scale(1.06); }
.project-media .cat { position: absolute; top: 12px; left: 12px; font-size: 0.7rem; font-family: var(--display); font-weight: 600; letter-spacing: 0.04em; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px); border: 1px solid var(--border); color: var(--orange); }
.project-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-body h3 { font-size: 1.18rem; color: var(--text); }
.project-body p { color: var(--muted); font-size: 0.9rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 6px; }
.project-tags span { font-size: 0.72rem; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.project-link { margin-top: 4px; font-family: var(--display); font-size: 0.8rem; font-weight: 600; color: var(--orange); }

/* ---------- process (LIGHT, cream band) ---------- */
#process { background: var(--surface-2); }
.process-wrap { position: relative; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; position: relative; box-shadow: var(--shadow); }
.step .n { font-family: var(--display); font-weight: 700; font-size: 2.4rem; color: var(--orange); }
.step h3 { font-size: 1.12rem; margin: 10px 0 8px; color: var(--text); }
.step p { color: var(--muted); font-size: 0.9rem; }

/* ---------- contact (DARK card on light page) ---------- */
.cta-card { position: relative; overflow: hidden; border: 1px solid var(--dark-border-strong); border-radius: clamp(22px, 3vw, 34px); background: linear-gradient(160deg, var(--dark-surface), var(--dark-bg)); color: var(--dark-text); padding: clamp(40px, 7vw, 84px); text-align: center; box-shadow: var(--shadow); }
.cta-card .glow { position: absolute; top: -45%; left: 50%; transform: translateX(-50%); width: 75%; height: 90%; background: radial-gradient(50% 50% at 50% 50%, rgba(229, 95, 3, 0.32), transparent 70%); pointer-events: none; }
.cta-card > * { position: relative; }
.cta-card .eyebrow, .cta-card .eyebrow::before { color: var(--orange-bright); background-color: transparent; }
.cta-card .eyebrow::before { background: var(--orange-bright); }
.cta-card h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-top: 14px; color: var(--dark-text); }
.cta-card p { color: var(--dark-muted); max-width: 50ch; margin: 18px auto 0; font-size: 1.06rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 34px; }
.cta-meta { display: flex; flex-wrap: wrap; gap: 14px 46px; justify-content: center; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--dark-border); }
.cta-meta div { display: flex; flex-direction: column; gap: 3px; }
.cta-meta span { font-family: var(--display); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dark-faint); }
.cta-meta a, .cta-meta p { color: var(--dark-text); }
.cta-meta a:hover { color: var(--orange-bright); }

/* ---------- footer (DARK) ---------- */
.footer { border-top: 1px solid var(--dark-border); background: var(--dark-bg); color: var(--dark-text); padding-block: 40px; }
.footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer .logo { color: var(--dark-text); }
.footer .logo b { color: var(--orange-bright); }
.footer .links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer .links a { font-size: 0.86rem; color: var(--dark-muted); transition: color .18s ease; }
.footer .links a:hover { color: var(--orange-bright); }
.footer .copy { color: var(--dark-faint); font-size: 0.82rem; }

/* ---------- animations ---------- */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 95, 3, 0.5); } 70% { box-shadow: 0 0 0 8px rgba(229, 95, 3, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 95, 3, 0); } }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .services, .projects, .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid > * { min-width: 0; }
  .hero-text { min-width: 0; }
  .hero h1 { font-size: clamp(1.9rem, 7.6vw, 3rem); overflow-wrap: break-word; }
  .hero p.lead { max-width: 100%; overflow-wrap: break-word; }
  /* simplify the hero visual on mobile: one clean preview, drop the overlapping
     cards and floating chips that overflowed the narrow viewport */
  .hero-visual { order: -1; position: relative; min-height: auto; max-width: 460px; margin-inline: auto; }
  .hero-visual .glow { display: none; }
  .preview--top, .preview--bottom, .float-chip { display: none; }
  .preview--main { position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 11; transform: none; }
}
@media (max-width: 620px) {
  .services, .projects, .steps { grid-template-columns: 1fr; }
}
