/* ==========================================================================
   Studio Web App — styles.css
   A web-design studio app template by Ricky Januari (rickyjanuari.com).
   ATM (Amati-Tiru-Modifikasi) of the Arvelo app-shell structure: a photo-like
   background, one floating glass window, a centred pill nav and a floating
   icon rail — with Ricky's own content, palette and projects.
   --------------------------------------------------------------------------
   CUSTOMISATION — edit the tokens in :root below. Every colour, font and
   radius in this file reads from these variables, so a new look is one edit.
   Palettes are switched at runtime with [data-palette] on <html> (see
   script.js, applyPalette). The Travertine palette is the default.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --primary: #2a2724;      /* near-black brown — buttons, active pill, headings */
  --secondary: #8a6844;    /* bronze accent — links, progress, highlights */
  --tint: #ece6dd;         /* warm cream — window and card backgrounds */
  --bg: #d9cfc0;           /* page backdrop behind the floating window */
  --surface: #f6f1e8;      /* cards on the cream tint */
  --surface-2: #fffdf8;    /* raised cards / inputs */
  --text: #2a2724;
  --muted: #7a6f63;
  --line: rgba(42, 39, 36, 0.12);
  --accent: #8a6844;       /* alias of --secondary, used by buttons */
  --radius: 20px;         /* card corner radius — change in Appearance */
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Urbanist", "Manrope", system-ui, sans-serif;
  --shadow: 0 24px 60px rgba(42, 39, 36, 0.28);
  --glass: rgba(255, 253, 248, 0.72);
}

/* Palette: Studio — Ricky's black / orange brand */
html[data-palette="studio"] {
  --primary: #16130f;
  --secondary: #f97316;
  --tint: #f4ede3;
  --bg: #1c1712;
  --surface: #fff8ef;
  --surface-2: #ffffff;
  --accent: #f97316;
  --muted: #8a7a68;
}

/* Palette: Slate — cool grey-blue */
html[data-palette="slate"] {
  --primary: #1e293b;
  --secondary: #64748b;
  --tint: #e8edf2;
  --bg: #cbd5e1;
  --surface: #f1f5f9;
  --surface-2: #ffffff;
  --accent: #475569;
  --muted: #7c8aa0;
}

/* Style: Solid cards instead of glass */
html[data-style="solid"] { --glass: var(--surface-2); }

/* Density: Compact */
html[data-density="compact"] { --radius: 14px; }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(42, 39, 36, 0.10), rgba(42, 39, 36, 0.28)),
    radial-gradient(120% 70% at 50% 0%, #e9dcc8 0%, #c9b797 45%, #8a7a5f 100%);
  min-height: 100vh;
}
html[data-palette="studio"] body {
  background:
    linear-gradient(180deg, rgba(22, 19, 15, 0.15), rgba(22, 19, 15, 0.45)),
    radial-gradient(120% 70% at 50% 0%, #3a2c1c 0%, #241a10 55%, #120d08 100%);
}
html[data-palette="slate"] body {
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.10), rgba(30, 41, 59, 0.30)),
    radial-gradient(120% 70% at 50% 0%, #dbe4ee 0%, #aebccb 55%, #6b7d94 100%);
}
a { color: var(--secondary); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
.sample-note {
  font-size: 11px; color: var(--muted); letter-spacing: 0.02em;
}
.kicker {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}

/* ---------- App shell: floating glass window ---------- */
.stage { padding: 28px 22px 48px; display: flex; gap: 14px; justify-content: center; align-items: flex-start; }
.app {
  flex: 1; max-width: 1180px; min-width: 0;
  background: var(--tint);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.app-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.pill-nav {
  display: flex; gap: 2px; margin: 0 auto; padding: 4px;
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 999px;
}
.pill-nav button {
  border: 0; background: transparent; color: var(--text);
  padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 13px;
}
.pill-nav button.active { background: var(--primary); color: #fff; }
.pill-nav button .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--secondary); margin-left: 5px; vertical-align: 1px;
}
.head-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.icon-btn {
  border: 1px solid var(--line); background: var(--surface-2);
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; position: relative;
}
.badge {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: #c2410c; color: #fff;
  font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.btn {
  border: 0; border-radius: 999px; padding: 10px 18px;
  font-weight: 800; font-size: 13px; background: var(--primary); color: #fff;
  text-decoration: none; display: inline-block;
}
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-sm { padding: 8px 14px; }

/* Left floating icon rail */
.rail {
  width: 62px; flex: 0 0 62px; position: sticky; top: 28px;
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 20px;
  padding: 10px 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 12px 30px rgba(42, 39, 36, 0.18);
}
.rail button {
  width: 44px; height: 44px; border-radius: 14px; border: 0; background: transparent;
  font-size: 18px; display: flex; align-items: center; justify-content: center; position: relative;
}
.rail button.active { background: var(--primary); color: #fff; }
.rail .avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--secondary);
  color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center;
  margin-top: 6px; border: 0;
}
.rail .showreel {
  margin-top: 10px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.1;
}
.rail-label { font-size: 9px; color: var(--muted); text-align: center; padding: 0 4px; }

/* ---------- Views / content ---------- */
.app-body { padding: 22px 22px 28px; }
.view { display: none; }
.view.active { display: block; }
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--secondary); }
.hero p.lede { color: var(--muted); margin-top: 10px; max-width: 640px; line-height: 1.6; }

/* Hero carousel */
.carousel {
  margin-top: 18px; border-radius: var(--radius); overflow: hidden;
  position: relative; min-height: 300px; color: #fff;
  box-shadow: 0 16px 40px rgba(42, 39, 36, 0.22);
}
.slide { display: none; position: absolute; inset: 0; padding: 26px; }
.slide.active { display: flex; flex-direction: column; justify-content: flex-end; }
.slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.62)); }
.slide > * { position: relative; z-index: 1; }
.slide h2 { font-size: clamp(24px, 3.4vw, 38px); }
.slide .slide-tag { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; font-weight: 700; }
.slide p { opacity: 0.92; margin-top: 6px; max-width: 560px; line-height: 1.55; }
.slide .slide-meta { display: flex; gap: 14px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.slide .slide-meta .btn { background: #fff; color: var(--primary); }
.carousel-nav {
  position: absolute; right: 18px; top: 18px; z-index: 2; display: flex; gap: 8px; align-items: center;
}
.carousel-nav .counter { font-weight: 800; font-size: 13px; background: rgba(0,0,0,0.45); padding: 7px 12px; border-radius: 999px; }
.carousel-nav button {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.92); color: var(--primary); font-size: 16px; font-weight: 800;
}
.dashes { position: absolute; left: 26px; bottom: 20px; z-index: 2; display: flex; gap: 6px; }
.dashes i { width: 26px; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.45); cursor: pointer; }
.dashes i.on { background: #fff; }
/* Slide artwork: CSS gradients only — no copied photos. Each slide has its own named gradient. */
.slide-art-1 { background: linear-gradient(135deg, #1e293b 0%, #0f766e 55%, #f97316 130%); }
.slide-art-2 { background: linear-gradient(135deg, #78350f 0%, #b45309 50%, #fde68a 130%); }
.slide-art-3 { background: linear-gradient(135deg, #312e81 0%, #7c3aed 55%, #f472b6 130%); }
.slide-art-4 { background: linear-gradient(135deg, #134e4a 0%, #0d9488 55%, #a7f3d0 130%); }
.slide-art-5 { background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 50%, #fca5a5 130%); }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat b { font-family: var(--font-display); font-size: 30px; display: block; }
.stat span { color: var(--muted); font-size: 13px; }

/* Today strip */
.today { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.today .cell { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.today .cell b { font-family: var(--font-display); font-size: 24px; display: block; }
.today .cell span { color: var(--muted); font-size: 12px; }

/* Dashboard rows */
.rows { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; margin-top: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h3 { font-size: 16px; margin-bottom: 4px; }
.panel .panel-link { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.row-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.row-item:first-of-type { border-top: 0; }
.row-item .thumb {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 15px;
}
.row-item .grow { flex: 1; min-width: 0; }
.row-item .grow b { display: block; font-size: 14px; }
.row-item .grow span { color: var(--muted); font-size: 12px; }
.chip {
  font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  background: var(--tint); border: 1px solid var(--line); white-space: nowrap;
}
.chip.bronze { background: var(--secondary); color: #fff; border-color: transparent; }
.chip.green { background: #dcfce7; color: #166534; border-color: transparent; }
.progress { height: 7px; border-radius: 99px; background: rgba(42,39,36,0.12); margin-top: 8px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--secondary); border-radius: 99px; }
.budget-line { display: flex; justify-content: space-between; font-size: 13px; padding: 9px 0; border-top: 1px solid var(--line); }
.budget-line:first-of-type { border-top: 0; }

/* Projects view: filters + cards */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.filters .chip-btn {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px;
  padding: 7px 13px; font-weight: 700; font-size: 12px;
}
.filters .chip-btn.on { background: var(--primary); color: #fff; border-color: transparent; }
.filters input[type="search"] {
  margin-left: auto; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font: inherit; font-size: 13px; background: var(--surface-2); min-width: 180px;
}
.view-toggle { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.view-toggle button { border: 0; background: var(--surface-2); padding: 7px 12px; font-weight: 700; }
.view-toggle button.on { background: var(--primary); color: #fff; }
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.proj-grid.list { grid-template-columns: 1fr; }
.proj-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.proj-card .cover { height: 110px; display: flex; align-items: flex-end; padding: 12px; color: #fff; font-weight: 800; }
.proj-card .body { padding: 14px; }
.proj-card .body b { display: block; font-size: 15px; }
.proj-card .body span { color: var(--muted); font-size: 12px; }
.proj-card .meta { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.heart { margin-left: auto; border: 0; background: transparent; font-size: 17px; }
.heart.saved { color: #c2410c; }

/* Services + estimate */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.service b { display: block; font-size: 15px; }
.service .from { font-family: var(--font-display); font-size: 22px; margin-top: 6px; }
.service span { color: var(--muted); font-size: 13px; line-height: 1.5; display: block; margin-top: 4px; }
.estimator { margin-top: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.estimator label { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 12px 0 6px; }
.estimator select, .estimator input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; background: var(--surface);
}
.estimate-out { font-family: var(--font-display); font-size: 28px; margin-top: 12px; }

/* Overlays: search, notifications, appearance, start-a-project */
.overlay {
  position: fixed; inset: 0; background: rgba(20, 16, 12, 0.55);
  display: none; align-items: flex-start; justify-content: center; padding: 90px 16px 16px; z-index: 50;
}
.overlay.open { display: flex; }
.sheet {
  width: min(560px, 100%); background: var(--surface-2); color: var(--text);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); max-height: 75vh; overflow: auto;
}
.sheet input[type="search"], .sheet input[type="text"], .sheet input[type="email"], .sheet select, .sheet textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; background: var(--surface); margin-top: 8px;
}
.sheet h3 { font-size: 17px; }
.sheet .hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.search-item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 6px; border-top: 1px solid var(--line); cursor: pointer; }
.search-item:first-of-type { border-top: 0; }
.search-item span { color: var(--muted); font-size: 12px; }
.notif { display: flex; gap: 10px; padding: 11px 4px; border-top: 1px solid var(--line); }
.notif:first-of-type { border-top: 0; }
.notif b { display: block; font-size: 13px; }
.notif span { color: var(--muted); font-size: 12px; }
.palette-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.swatch {
  border: 2px solid transparent; border-radius: 12px; padding: 8px 12px;
  font-weight: 700; font-size: 12px; background: var(--surface);
}
.swatch.on { border-color: var(--primary); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 12px; }
.seg button.on { background: var(--primary); color: #fff; }
.preview-box { margin-top: 12px; background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.preview-box b { font-family: var(--font-display); font-size: 20px; display: block; }
.preview-box .btn { margin-top: 10px; }
.close-x { float: right; border: 0; background: transparent; font-size: 18px; }

/* Footer inside the app */
.app-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 860px) {
  .stage { padding: 14px 10px 32px; }
  .rail { display: none; }
  .stats, .today { grid-template-columns: repeat(2, 1fr); }
  .rows, .services { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .pill-nav { order: 3; margin: 0; }
  .head-actions { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
