:root {
  --bg: #FFF7ED;              /* warm background (like sample) */
  --surface: #ffffff;
  --text: #111827;
  --muted: #6B7280;
  --accent: #C88E46;          /* coffee-gold accent */
  --accent-contrast: #ffffff;
  --border: #e7e5e4;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(200, 142, 70, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #141821;
    --text: #E5E7EB;
    --muted: #A1A1AA;
    --border: #232634;
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
  }
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, sans-serif;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.section {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

/* Skip link */
.skip-link {
  position: absolute; left: 8px; top: -40px;
  background: var(--text); color: var(--accent-contrast);
  padding: 8px 12px; border-radius: 8px;
  transition: top .2s ease;
  z-index: 1000;
}
.skip-link:focus { top: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-name { letter-spacing: .2px; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; box-shadow: var(--shadow); }
.brand-mark.small { width: 22px; height: 22px; background: linear-gradient(135deg, var(--accent), #e5b878); }
.brand-mark:not(.small) { background: none; }

.menu { display: flex; align-items: center; gap: 18px; }
.menu a { font-size: 15px; color: var(--text); opacity: .86; }
.menu a:hover { opacity: 1; }

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
}

/* Mobile nav */
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); gap: 4px; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); }
@media (max-width: 800px) {
  .menu { position: absolute; inset: 60px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 14px 18px; display: grid; gap: 12px; transform-origin: top; transform: scaleY(0); opacity: 0; pointer-events: none; }
  .menu.open { transform: scaleY(1); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: inline-flex; }
}

/* Hero */
.hero .eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .3px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.1;
  margin: 8px 0 10px;
}
.lead { color: var(--muted); font-size: clamp(16px, 2.2vw, 18px); max-width: 58ch; }

.actions { display: flex; gap: 12px; margin: 18px 0 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 10px 16px;
  font-weight: 600; letter-spacing: .2px; border: 1px solid transparent;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #e5b878); color: var(--accent-contrast); box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.02); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: color-mix(in oklab, var(--surface), var(--accent) 3%); }

.stats { display: flex; gap: 24px; margin-top: 16px; padding-left: 0; list-style: none; }
.stats li { display: grid; gap: 2px; }
.stats strong { font-size: 18px; }
.stats span { color: var(--muted); font-size: 13px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 4vw, 40px);
  align-items: center;
}
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* Abstract device art */
.device-stack { position: relative; height: 340px; }
.card { position: absolute; border-radius: 24px; box-shadow: var(--shadow); background: var(--surface); border: 1px solid var(--border); }
.phone { width: 180px; height: 320px; right: 8%; top: 8%; border-radius: 28px; }
.tablet { width: 300px; height: 210px; left: 4%; bottom: 10%; }
.watch { width: 120px; height: 120px; left: 38%; top: 10%; border-radius: 28px; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(120px 80px at 70% 30%, rgba(200,142,70,.12), transparent); }

/* Section head */
.section-head { display: grid; gap: 6px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(22px, 3vw, 28px); margin: 0; }
.section-head p { color: var(--muted); margin: 0; }

/* Services */
.grid-3 {
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

.card-lite {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.service .icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; color: var(--accent);
  background: color-mix(in oklab, var(--accent) 12%, var(--surface));
  margin-bottom: 10px;
}
.service h3 { margin: 4px 0 6px; font-size: 18px; }
.service p { margin: 0 0 8px; color: var(--muted); }
.bullets { margin: 0; padding-left: 16px; color: var(--muted); }
.bullets li { margin: 6px 0; }

/* Work */
.works { margin-top: 10px; }
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .2s ease;
  padding-bottom: 10px;
}
.work-card:hover { transform: translateY(-3px); }
.work-thumb { height: 140px; background: linear-gradient(135deg, var(--accent), #e5b878); }
.work-thumb.app-b { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.work-thumb.app-c { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.work-card h3 { margin: 10px 12px 4px; font-size: 18px; }
.work-card .muted { margin: 0 12px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 12px 0; }
.tags span {
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface), var(--accent) 3%);
  color: var(--text);
  padding: 4px 8px; border-radius: 999px; font-size: 12px;
}
.more { text-align: center; margin-top: 12px; }

/* Approach timeline */
.timeline { list-style: none; padding-left: 0; display: grid; gap: 12px; }
.timeline li {
  display: grid; grid-template-columns: 54px 1fr; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; align-items: start; box-shadow: var(--shadow);
}
.timeline .step {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: color-mix(in oklab, var(--accent) 14%, var(--surface));
  color: var(--accent); font-weight: 700;
}

/* Contact */
.contact .contact-card { align-self: start; }
.mini-form { display: grid; gap: 10px; }
.mini-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.mini-form input, .mini-form textarea {
  border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface); color: var(--text);
  padding: 10px 12px; font: inherit;
}
.mini-form input:focus, .mini-form textarea:focus { outline: 2px solid color-mix(in oklab, var(--accent) 30%, transparent); outline-offset: 2px; }

.muted { color: var(--muted); }
.tiny { font-size: 12px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0 36px;
}
.footer-grid { display: grid; gap: 8px; align-items: center; grid-template-columns: 1fr auto; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.foot-links { display: flex; gap: 14px; }
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
  .foot-links { flex-wrap: wrap; }
}

/* Back to top */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.to-top.show { opacity: 1; transform: translateY(0); }

/* Reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }