/* Creative Leaf: shared chrome.
   Tokens, reset, header, buttons, labels, grids, index rows, tilted cards,
   round badges, photo frames, the contact form block and the footer.
   Every page loads this first. Page-specific rules live in studio.css (home)
   and page.css (inner pages). */

:root {
  /* page tokens: swap in dark mode */
  --paper: #fafaf7;
  --ink: #0b0b0a;
  --card: #ffffff;
  --line: #d9d8d1;
  --line-soft: #e6e5df;
  --ph: #e9e8e2;
  --text-2: #3e3d38;
  --muted: #5f5e58;
  /* constants */
  --green: #00c063;
  --on-green: #04140b;
  --panel: #161715;
  --panel-2: #1a1b19;
  --line-dark: #2a2b28;
  --border-dark: #3a3b37;
  --text-dark-2: #cfcec7;
  --muted-dark: #b8b7b0;
  --muted-dark-2: #8f8e87;
  --wash: rgba(0, 192, 99, 0.4);
  --ring: 0 0 0 4px rgba(0, 192, 99, 0.18);
  --shadow-badge: 0 12px 30px rgba(0, 60, 30, 0.25);
  --shadow-card: 0 24px 50px rgba(0, 0, 0, 0.35);
  --shadow-frame: 0 14px 34px rgba(0, 0, 0, 0.12);
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;
  --gutter: clamp(20px, 3vw, 40px);
  --gap-section: clamp(96px, 10vw, 150px);
  --stretch: 112%;
  color-scheme: light;
}
/* Dark mode: follows the system unless the toggle has set data-theme. */
html[data-theme="dark"] { --paper: #0b0b0a; --ink: #fafaf7; --card: #161715; --line: #2a2b28; --line-soft: #232421; --ph: #161715; --text-2: #cfcec7; --muted: #8f8e87; --shadow-frame: 0 14px 34px rgba(0, 0, 0, 0.5); color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) { --paper: #0b0b0a; --ink: #fafaf7; --card: #161715; --line: #2a2b28; --line-soft: #232421; --ph: #161715; --text-2: #cfcec7; --muted: #8f8e87; --shadow-frame: 0 14px 34px rgba(0, 0, 0, 0.5); color-scheme: dark; }
}
/* Blocks that are dark in both themes keep the light token set, so their
   existing rules (background: var(--ink)) resolve to black. In dark mode they
   lift to the panel colour so they still read as blocks on the dark page. */
.ask, .foot, .board, .planner, .deal, .chat, .foot-card, .blk.dark, .card-ink, .cs, .feature-cap, .four .ink, .three-cols .ink, .cs-ways .d {
  --paper: #fafaf7; --ink: #0b0b0a; --card: #ffffff; --line: #d9d8d1; --line-soft: #e6e5df; --ph: #e9e8e2; --text-2: #3e3d38; --muted: #5f5e58;
}
html[data-theme="dark"] :is(.ask, .foot, .board, .planner, .deal, .chat, .foot-card, .blk.dark, .card-ink, .feature-cap, .four .ink, .three-cols .ink) { --ink: #161715; }
html[data-theme="dark"] :is(.card-ink, .feature-cap, .four .ink, .three-cols .ink, .foot-card, .planner, .deal) { box-shadow: inset 0 0 0 1px #2a2b28; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) :is(.ask, .foot, .board, .planner, .deal, .chat, .foot-card, .blk.dark, .card-ink, .feature-cap, .four .ink, .three-cols .ink) { --ink: #161715; }
  html:not([data-theme="light"]) :is(.card-ink, .feature-cap, .four .ink, .three-cols .ink, .foot-card, .planner, .deal) { box-shadow: inset 0 0 0 1px #2a2b28; }
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
[x-cloak] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: opacity 0.2s, color 0.2s, background 0.2s; }
a:hover { opacity: 0.8; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--green); color: var(--on-green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }

.wrap { max-width: 1440px; margin: 0 auto; background: var(--paper); overflow: hidden; }
.gutter { padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 14px; color: var(--muted); line-height: 1.7; }
.label a { opacity: 1; }
.label a:hover { color: var(--ink); opacity: 1; }
.label-caps { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.section { padding: var(--gap-section) var(--gutter) 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 40px; }
.two-1-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.half { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }

/* ---------- type ---------- */
.display { font-weight: 800; font-stretch: var(--stretch); letter-spacing: -0.03em; line-height: 1; }
.h1 { font-size: clamp(52px, 6.6vw, 96px); line-height: 1.04; font-weight: 800; font-stretch: var(--stretch); letter-spacing: -0.04em; }
.h2 { font-size: clamp(40px, 4.6vw, 64px); line-height: 1; font-weight: 800; font-stretch: var(--stretch); letter-spacing: -0.03em; }
.lede { font-size: 19px; line-height: 1.55; color: var(--text-2); }
.pill-img {
  display: inline-block; width: 1.9em; height: 0.8em; border-radius: 999px; vertical-align: -0.06em;
  background-size: cover; background-position: center;
}
.pill-img.tilt-l { transform: rotate(-4deg); }
.pill-img.tilt-r { transform: rotate(3deg); }
.pill-ph { background: repeating-linear-gradient(135deg, var(--line-soft) 0 8px, var(--line) 8px 16px); border: 2px dashed var(--muted-dark); }
.dot { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%; vertical-align: -0.06em; background: var(--green); }
.wash { background: linear-gradient(transparent 60%, var(--wash) 60%); }

/* ---------- header ---------- */
.top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 22px var(--gutter); font-family: var(--mono); font-size: 14px;
}
.top .brand { display: flex; align-items: center; gap: 12px; }
.top .brand:hover { opacity: 1; }
.top .brand img { width: 40px; height: 40px; border-radius: 8px; outline: 1px solid var(--line); }
.top .brand span { font-family: var(--sans); font-size: 18px; font-weight: 700; font-stretch: 110%; white-space: nowrap; }
.top nav { display: flex; gap: 28px; justify-content: center; }
.top nav a:hover { opacity: 1; color: var(--muted); }
.top .top-cta { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }

/* ---------- theme toggle ---------- */
.theme { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 16px; line-height: 1; color: var(--ink); transition: background 0.2s, border-color 0.2s; }
.theme:hover { border-color: var(--ink); }
.cs .theme { color: #fafaf7; border-color: #3a3b37; }
.cs .theme:hover { border-color: #fafaf7; }
.theme::before { content: "\263E"; }
html[data-theme="dark"] .theme::before { content: "\2600"; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .theme::before { content: "\2600"; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px;
  font-family: var(--mono); font-size: 14px; line-height: 1.3; white-space: nowrap;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--green); color: var(--on-green); opacity: 1; }
.btn-green { background: var(--green); color: var(--on-green); }
.btn-green:hover { background: var(--ink); color: var(--paper); }
.btn-sans { font-family: var(--sans); font-size: 16px; font-weight: 700; padding: 14px 22px; }
.link-ul { border-bottom: 1.5px solid currentColor; padding-bottom: 4px; font-family: var(--mono); font-size: 15px; }
.link-ul:hover { opacity: 1; border-color: var(--green); }
.chip {
  display: inline-block; border: 1.5px solid var(--ink); border-radius: 999px; padding: 12px 20px;
  font-size: 18px; font-weight: 600; line-height: 1.2;
}
.chip-green { background: var(--green); color: var(--on-green); border-color: var(--green); }
.tag { display: inline-block; border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 12px; font-family: var(--mono); font-size: 13px; }

/* ---------- index rows ---------- */
.rows { border-top: 2px solid var(--ink); }
.rows-head, .row {
  display: grid; grid-template-columns: 80px 1.3fr 1.6fr 1fr 40px; gap: 24px; align-items: baseline;
}
.rows-head {
  padding: 0 16px 14px; border-bottom: 2px solid var(--ink);
  font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.rows > .rows-head { border-top: 0; }
.rows.no-head .row:first-child { border-top: 0; }
.row { padding: 26px 16px; border-bottom: 1px solid var(--line); transition: background 0.2s, border-radius 0.2s; }
a.row:hover { background: var(--green); border-radius: 14px; opacity: 1; }
.row-no { font-family: var(--mono); font-size: 14px; }
.row-name { font-size: 36px; font-weight: 700; font-stretch: 115%; letter-spacing: -0.02em; line-height: 1.05; }
.row-what { font-size: 17px; }
.row-meta { font-family: var(--mono); font-size: 14px; }
.row-arrow { font-size: 18px; }
.rows-note { margin: 24px 16px 0; font-size: 16px; color: var(--muted); }

/* ---------- cards ---------- */
.tilt { transition: transform 0.25s; will-change: transform; }
a.tilt:hover, .tilt.hover:hover { opacity: 1; }
.tilt-1:hover { transform: rotate(-1.5deg) translateY(-6px); }
.tilt-2:hover { transform: rotate(1deg) translateY(-6px); }
.tilt-3:hover { transform: rotate(-1deg) translateY(-6px); }
.card { border-radius: 20px; padding: 36px 32px 40px; display: flex; flex-direction: column; gap: 20px; }
.card-green { background: var(--green); color: var(--on-green); }
.card-white { background: var(--card); border: 1px solid var(--line); }
.card-ink { background: var(--ink); color: var(--paper); }
.card .kicker { font-family: var(--mono); font-size: 14px; }
.card-white .kicker { color: var(--muted); }
.card-ink .kicker { color: var(--muted-dark); }
.card h3 { margin: auto 0 0; font-size: 46px; line-height: 1; font-weight: 800; font-stretch: var(--stretch); letter-spacing: -0.03em; }
.card p { font-size: 18px; line-height: 1.5; }
.card-white p { color: var(--text-2); }
.card-ink p { color: var(--text-dark-2); }
.card .cta { font-family: var(--mono); font-size: 15px; }
.card-green .cta { font-weight: 500; }
.faq { border: 1.5px solid var(--ink); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.faq b { font-size: 24px; font-weight: 800; font-stretch: var(--stretch); letter-spacing: -0.02em; line-height: 1.1; }
.faq span { font-size: 17px; line-height: 1.5; color: var(--text-2); }
.faq a { text-decoration: underline; }

/* ---------- round badge ---------- */
.badge {
  width: 168px; height: 168px; border-radius: 50%; background: var(--green); color: var(--on-green);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px;
  transform: rotate(12deg); box-shadow: var(--shadow-badge); transition: transform 0.3s;
}
.badge:hover { transform: rotate(0deg) scale(1.06); opacity: 1; }
.badge .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.badge b { font-size: 22px; font-weight: 800; font-stretch: var(--stretch); line-height: 1; }
.badge .arrow { font-size: 18px; }

/* ---------- photo frames ---------- */
.frame { position: absolute; background: var(--card); padding: 10px 10px 16px; box-shadow: var(--shadow-frame); }
.frame .ph {
  height: 280px; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, var(--line-soft) 0 10px, var(--line) 10px 20px);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.frame img { height: 280px; width: 100%; object-fit: cover; }
.frame .cap { margin-top: 10px; font-family: var(--mono); font-size: 13px; }
.frames { position: relative; height: 440px; }

/* ---------- avatars ---------- */
.avatars { display: flex; flex-shrink: 0; }
.avatars span {
  width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--ink);
  background: repeating-linear-gradient(135deg, var(--line-dark) 0 6px, #1f201d 6px 12px);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9px; color: var(--muted-dark-2); overflow: hidden;
}
.avatars span + span { margin-left: -12px; }
.avatars img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- contact form block ---------- */
.ask {
  margin: var(--gap-section) var(--gutter) 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(32px, 4vw, 64px); background: var(--ink); color: var(--paper); border-radius: 28px;
  align-items: stretch; padding: clamp(28px, 4vw, 56px);
}
.ask-copy { display: flex; flex-direction: column; gap: 20px; }
.ask-copy .label { color: var(--green); line-height: 1.5; }
.ask-copy h2 { font-size: clamp(44px, 5vw, 72px); line-height: 0.96; font-weight: 800; font-stretch: var(--stretch); letter-spacing: -0.035em; }
.ask-copy .lede { font-size: 18px; color: var(--text-dark-2); }
.ask-who { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line-dark); }
.ask-who .team { display: flex; align-items: center; gap: 14px; }
.ask-who .team > span:last-child { font-size: 16px; line-height: 1.4; color: var(--text-dark-2); }
.ask-steps { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px 12px; font-size: 16px; line-height: 1.4; color: var(--text-dark-2); }
.ask-steps i { font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--green); }
.ask-mail { margin-top: auto; color: var(--paper); font-family: var(--mono); font-size: 15px; border-bottom: 1.5px solid var(--green); align-self: flex-start; padding-bottom: 4px; }
.ask-mail:hover { opacity: 1; color: var(--green); }
.form {
  display: flex; flex-direction: column; gap: 20px; background: var(--paper); color: var(--ink);
  border-radius: 20px; padding: clamp(24px, 3vw, 36px); transform: rotate(0.6deg); box-shadow: var(--shadow-card);
}
.form .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form label, .form .field { display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); }
.form .group-label { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--green); }
.form input, .form textarea {
  font-family: var(--sans); font-size: 17px; line-height: 1.5; padding: 16px 18px; border: 1.5px solid var(--line);
  border-radius: 14px; background: var(--card); color: var(--ink); outline: none; width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s; text-transform: none; letter-spacing: 0;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form textarea:focus { border-color: var(--green); box-shadow: var(--ring); }
.form input::placeholder, .form textarea::placeholder { color: #8f8e87; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  border: 1.5px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px;
  padding: 9px 14px; font-family: var(--mono); font-size: 14px; transition: background 0.15s, border-color 0.15s;
}
.chips button.on { background: var(--green); border-color: var(--green); }
.form .submit {
  background: var(--green); color: var(--on-green); border-radius: 999px; padding: 20px 28px;
  font-size: 18px; font-weight: 700; display: flex; justify-content: space-between; width: 100%;
  transition: background 0.2s, color 0.2s;
}
.form .submit:hover { background: var(--ink); color: var(--paper); }
.form .hint { font-family: var(--mono); font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- footer ---------- */
.foot { margin-top: clamp(96px, 10vw, 160px); background: var(--ink); color: #f2f1ec; padding: 64px var(--gutter) 0; overflow: hidden; }
.foot a:hover { opacity: 1; color: var(--green); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.foot-col { display: flex; flex-direction: column; gap: 12px; }
.foot-col .label-caps { color: var(--muted-dark-2); }
.foot-col a { font-size: 17px; font-weight: 600; }
.foot-col a.green { color: var(--green); overflow-wrap: anywhere; }
.foot-mark { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-top: 72px; }
.foot-word { font-size: clamp(64px, 12.2vw, 176px); line-height: 0.78; font-weight: 800; font-stretch: 100%; letter-spacing: -0.05em; white-space: nowrap; margin-bottom: -14px; min-width: 0; }
.foot-tile { width: clamp(80px, 10vw, 150px); border-radius: 22px; outline: 1px solid var(--line-dark); transform: rotate(6deg); margin: 0 12px 40px 0; flex-shrink: 0; }
.foot-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 0 28px; border-top: 1px solid var(--line-dark); font-family: var(--mono); font-size: 13px; color: var(--muted-dark-2); position: relative; background: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .row-name { font-size: 30px; }
}
@media (max-width: 800px) {
  .top { grid-template-columns: 1fr auto; gap: 12px; padding-block: 16px; }
  .top .btn { font-size: 13px; padding: 10px 14px; }
  .top .brand { flex-shrink: 0; }
  .top .top-cta { min-width: 0; gap: 10px; }
  .top .btn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top .theme { flex-shrink: 0; }
  .top nav { display: none; }
  .two, .two-1-2, .half { grid-template-columns: 1fr; gap: 20px; }
  .half { gap: 40px; }
  .rows-head { display: none; }
  .rows { border-top: 2px solid var(--ink); }
  .rows .row { grid-template-columns: 1fr; gap: 8px; padding: 22px 12px; }
  .row-no { order: -1; color: var(--muted); }
  .row-arrow { display: none; }
  .row-name { font-size: 30px; }
  .badge { width: 110px; height: 110px; }
  .badge b { font-size: 16px; }
  .badge .kicker { font-size: 10px; }
  .badge .arrow { font-size: 14px; }
  .ask { grid-template-columns: 1fr; border-radius: 22px; }
  .form { transform: none; }
  .foot-mark { margin-top: 48px; flex-direction: column-reverse; align-items: flex-start; gap: 20px; }
  .foot-word { font-size: 15.5vw; margin-bottom: 0; letter-spacing: -0.06em; }
  .foot-tile { margin: 0 0 8px; width: 72px; transform: rotate(6deg); }
  .frames { height: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .frame { position: static; transform: none !important; width: auto !important; }
  .frame .ph, .frame img { height: 160px; }
}
@media (max-width: 560px) {
  /* Phones: the logo carries the brand, so the name gives its room to the button. */
  .top .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .top .theme { width: 36px; height: 36px; font-size: 14px; }
  .top .btn { font-size: 12.5px; padding: 10px 13px; }
  .top { grid-template-columns: auto minmax(0, 1fr); }
  .top .brand img { flex-shrink: 0; }
}
@media (max-width: 360px) {
  .top .top-cta { gap: 8px; }
  .top .btn { font-size: 11.5px; padding: 9px 11px; letter-spacing: -0.01em; }
}
@media (hover: none) {
  .tilt:hover, .badge:hover { transform: none; }
  .tilt-1:hover, .tilt-2:hover, .tilt-3:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tilt, .badge, .btn, a { transition: none; }
  .tilt:hover, .badge:hover { transform: none; }
}
