/* Le Fleuriste — shared styles (from the Figma file "Le Fleuriste") */
@font-face { font-family: "Serrif Condensed"; src: url("fonts/SerrifCondensed-TRIAL-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Serrif Condensed"; src: url("fonts/SerrifCondensed-TRIAL-LightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Serrif Condensed"; src: url("fonts/SerrifCondensed-TRIAL-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Serrif Condensed"; src: url("fonts/SerrifCondensed-TRIAL-RegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Serrif Condensed"; src: url("fonts/SerrifCondensed-TRIAL-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Serrif Condensed"; src: url("fonts/SerrifCondensed-TRIAL-MediumItalic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

:root {
  --bg: #201107;          /* page + video background */
  --bg-2: #2a1a0f;
  --ink: #f4f0e9;         /* cream */
  --dark: #211106;        /* text on cream */
  --ink-2: rgba(244, 240, 233, .78);
  --muted: rgba(244, 240, 233, .5);
  --fill: rgba(244, 240, 233, .10);
  --fill-2: rgba(244, 240, 233, .05);
  --fill-3: rgba(244, 240, 233, .16);
  --line: rgba(244, 240, 233, .14);
  --danger: #e59a7c;
  --ok: #cfe0b8;
  --gutter: 26px;
  --font: "Serrif Condensed", "Times New Roman", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.25;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 400; line-height: .95; margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(2.6rem, 6vw, 5.5rem); text-transform: uppercase; }
h3 { font-size: 1.6rem; line-height: 1.05; }
p { margin: 0 0 1em; }
address { font-style: normal; }
.eyebrow { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
code { font-size: .9em; background: var(--fill); padding: 0 .3em; }
::selection { background: var(--ink); color: var(--dark); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

/* ---------- Buttons (Figma "Frame 1" / "Frame 5") ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 17px 20px; border: 0; border-radius: 0;
  background: var(--fill); color: var(--ink);
  font: 500 16px/18px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--fill-3); }
.btn.solid { background: var(--ink); color: var(--dark); }
.btn.solid:hover { background: #fff; }
.btn.small { padding: 10px 14px; font-size: 14px; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--fill-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); cursor: pointer; }
.link:hover { text-decoration-color: var(--ink); }

/* ---------- Landing (Figma: Desktop - 7 / MacBook / iPad / iPhone) ---------- */
.landing {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: var(--gutter);
  padding-bottom: max(var(--gutter), env(safe-area-inset-bottom));
}
.landing-logo { margin: 0; line-height: 0; }
.landing-logo img { width: 100%; height: auto; }
.stage { display: grid; place-items: center; padding: 32px 0; }
/* Browsers/displays can colour-manage video slightly differently from CSS colours, which shows the video's box.
   Fade the frame's edges into the page: the coin fills ~56% of the width, so the fade starts outside it. */
.coin {
  width: 280px; height: 350px; object-fit: cover;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 64%, transparent 98%);
  mask-image: radial-gradient(circle closest-side, #000 64%, transparent 98%);
}
.landing-foot { display: flex; align-items: flex-end; gap: 36px; font-size: 14px; line-height: 18px; }
.landing-foot .desc { max-width: 435px; margin: 0; }
.landing-foot address { flex: 0 0 auto; }
.landing-foot .btn { margin-left: auto; }

/* ---------- Login card (Figma: Desktop - 9, "Frame 7") ---------- */
.login-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--gutter); overflow-y: auto; }
.login-card {
  width: 100%; max-width: 385px; padding: 32px;
  display: flex; flex-direction: column; gap: 51px;
  background: var(--fill-2);
  -webkit-backdrop-filter: blur(50px); backdrop-filter: blur(50px);
  animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.login-head { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.login-logo { width: 270px; height: auto; }
.login-head p { font-size: 14px; line-height: 15px; margin: 0; }
.login-fields { display: flex; flex-direction: column; gap: 11px; }
.login-fields .btn { margin-top: 40px; width: 100%; }
.login-alt { margin-top: -30px; display: grid; gap: 8px; text-align: center; font-size: 14px; color: var(--ink-2); }

/* ---------- Inputs (Figma: 10% cream blocks) ---------- */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 17px 20px; border: 0; border-radius: 0;
  background: var(--fill); color: var(--ink);
  font: 400 16px/18px var(--font);
  -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--ink); opacity: .85; }
textarea::placeholder, .fields input::placeholder { opacity: .45; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--ink); outline-offset: 0; background: var(--fill-3); }
input[readonly] { color: var(--muted); }
input[type=date] { color-scheme: dark; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
select option { background: var(--bg); color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }

.notice { font-size: 14px; line-height: 18px; padding: 12px 16px; background: var(--fill-2); color: var(--ink-2); }
.notice.error { background: rgba(229, 154, 124, .14); color: var(--danger); }
.notice.success { background: rgba(207, 224, 184, .12); color: var(--ok); }

/* ---------- Portal shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px; padding: 16px var(--gutter);
  background: rgba(32, 17, 7, .82);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand { display: block; line-height: 0; flex: 0 0 auto; }
.brand img { height: 20px; width: auto; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: 10px 14px; cursor: pointer; font: 400 16px/18px var(--font); color: var(--ink-2); white-space: nowrap; }
.tab:hover { color: var(--ink); background: var(--fill-2); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--dark); font-weight: 500; }
.user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.user .email { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.demo-banner { background: var(--ink); color: var(--dark); font-size: 14px; padding: 8px 16px; text-align: center; }
.demo-banner button { margin-left: 8px; background: var(--dark); color: var(--ink); border: 0; padding: 4px 10px; font: 500 13px var(--font); cursor: pointer; }

.panel { display: none; }
.panel.active { display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 56px var(--gutter) 96px; }
.wrap.narrow { max-width: 780px; }
.page-head { margin-bottom: 40px; }
.page-head p { color: var(--ink-2); max-width: 40rem; font-size: 18px; line-height: 1.35; }
.card { background: var(--fill-2); padding: 28px; }

/* Standalone full-screen states (access pending, loading) */
.center-screen { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: var(--gutter); text-align: center; }
.center-screen .login-card { gap: 28px; }
.center-screen h2 { font-size: 2.4rem; margin: 0; }
.center-screen p { color: var(--ink-2); font-size: 15px; line-height: 1.35; margin: 0; }

/* ---------- The Project (story) ---------- */
.story-hero {
  min-height: calc(100vh - 60px); min-height: calc(100svh - 60px);
  display: grid; grid-template-columns: 1fr 280px 1fr; align-items: center; gap: 40px;
  padding: 48px var(--gutter);
}
.story-hero .coin { grid-column: 2; }
.story-hero .day, .story-hero .night { font-size: clamp(2rem, 4vw, 3.6rem); line-height: .95; text-transform: uppercase; }
.story-hero .day { text-align: right; }
.story-hero small { display: block; font-size: 15px; line-height: 1.3; text-transform: none; color: var(--ink-2); margin-top: 16px; max-width: 22rem; }
.story-hero .day small { margin-left: auto; }
.scroll-cue { grid-column: 1 / -1; text-align: center; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.scroll-cue::after { content: "↓"; display: block; margin-top: 6px; animation: bob 2s infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

.chapter { padding: 110px var(--gutter); border-top: 1px solid var(--line); }
.chapter .inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 180px 1fr; gap: 48px; }
.chapter .num { font-size: 15px; color: var(--muted); padding-top: 10px; }
.chapter .lead { font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.3; color: var(--ink-2); max-width: 44rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; margin-top: 40px; }
.pillar { background: var(--fill-2); padding: 28px; min-height: 190px; display: flex; flex-direction: column; }
.pillar .tag { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: auto; padding-bottom: 28px; }
.pillar h3 { margin-bottom: .35em; }
.pillar p { color: var(--ink-2); font-size: 15px; line-height: 1.35; margin: 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 40px; }
.stat { background: var(--fill-2); padding: 24px; }
.stat .v { font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1; }
.stat .l { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.3; }

.chart { margin-top: 40px; background: var(--fill-2); padding: 28px; }
.chart svg { width: 100%; height: auto; display: block; font-family: var(--font); }
.chart .legend { display: flex; gap: 22px; font-size: 14px; color: var(--ink-2); margin-top: 14px; flex-wrap: wrap; }
.chart .legend i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: -1px; }
.placeholder-note { font-size: 13px; color: var(--muted); margin-top: 14px; font-style: italic; }

.cta-final { text-align: center; padding: 130px var(--gutter); border-top: 1px solid var(--line); }
.cta-final p { color: var(--ink-2); max-width: 34rem; margin: 0 auto 32px; font-size: 18px; line-height: 1.35; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } .login-card { animation: none; } }

/* ---------- Planning ---------- */
.progress-card { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; margin-bottom: 40px; }
.progress-card .pct { font-size: 4.2rem; line-height: 1; }
.bar { height: 6px; background: var(--fill); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ink); transition: width .6s; }
.progress-card .meta { display: flex; gap: 22px; font-size: 14px; color: var(--ink-2); margin-top: 14px; flex-wrap: wrap; }

.planning-grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.filters { display: flex; gap: 2px; margin-bottom: 24px; flex-wrap: wrap; }
.chip { border: 0; background: var(--fill-2); padding: 10px 14px; font: 400 14px var(--font); cursor: pointer; color: var(--ink-2); }
.chip:hover { background: var(--fill); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--dark); }

.phase { margin-bottom: 36px; }
.phase h3 { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 0; text-transform: uppercase; font-size: 1.5rem; }
.phase h3 span { font-size: 14px; color: var(--muted); text-transform: none; }
.task { display: grid; grid-template-columns: 18px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.check { width: 16px; height: 16px; border: 1px solid var(--muted); margin-top: 1px; display: grid; place-items: center; font-size: 11px; color: var(--dark); }
.task.done .check { background: var(--ink); border-color: var(--ink); }
.task.in_progress .check { border-color: var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.task.done .title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted); }
.task .title { font-size: 17px; }
.task .desc { font-size: 14px; color: var(--ink-2); margin-top: 4px; line-height: 1.3; }
.task .dates { font-size: 13px; color: var(--muted); margin-top: 6px; }
.pill { font-size: 12px; padding: 5px 10px; white-space: nowrap; letter-spacing: .04em; text-transform: uppercase; }
.pill.todo { box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.pill.in_progress { background: var(--fill); color: var(--ink); }
.pill.done { background: var(--ink); color: var(--dark); }
.pill.late { background: rgba(229, 154, 124, .16); color: var(--danger); }

.updates h3 { text-transform: uppercase; font-size: 1.5rem; }
.update { padding: 18px 0; border-bottom: 1px solid var(--line); }
.update:last-child { border-bottom: 0; padding-bottom: 0; }
.update .date { font-size: 13px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.update .t { font-size: 17px; margin: 4px 0 6px; }
.update p { font-size: 14px; color: var(--ink-2); margin: 0; white-space: pre-line; line-height: 1.35; }

/* ---------- Forms ---------- */
.form-section { margin-bottom: 2px; }
.form-section h3 { text-transform: uppercase; font-size: 1.8rem; margin-bottom: .25em; }
.form-section > p { color: var(--ink-2); font-size: 15px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.field { display: grid; gap: 8px; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field label, .field .label { font-size: 14px; color: var(--ink-2); }
.field .hint { font-size: 13px; color: var(--muted); }
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
.checks label, .radios label { display: flex; gap: 12px; align-items: center; font-size: 15px; padding: 14px 16px; background: var(--fill-2); cursor: pointer; color: var(--ink-2); }
.checks label:hover, .radios label:hover { background: var(--fill); }
.checks label:has(input:checked), .radios label:has(input:checked) { background: var(--ink); color: var(--dark); }
.checks input, .radios input { margin: 0; accent-color: var(--dark); flex: 0 0 auto; }
.radios { display: flex; flex-wrap: wrap; gap: 2px; }
.money { position: relative; }
.money input { padding-left: 34px; }
.money::before { content: "$"; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.confidential { display: flex; gap: 14px; align-items: flex-start; background: var(--fill); padding: 18px 20px; font-size: 15px; color: var(--ink-2); margin-bottom: 24px; line-height: 1.35; }
.confidential b { color: var(--ink); font-weight: 500; }
.form-actions { display: flex; gap: 16px; align-items: center; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.success-card { text-align: center; padding: 72px 32px; }
.success-card h3 { text-transform: uppercase; font-size: 2rem; }

/* ---------- Admin ---------- */
.subtabs { display: flex; gap: 2px; margin-bottom: 28px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-bottom: 28px; }
.table-wrap { overflow-x: auto; background: var(--fill-2); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; background: var(--fill-2); white-space: nowrap; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--fill-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.detail td { background: var(--fill-2); }
.detail dl { display: grid; grid-template-columns: 200px 1fr; gap: 8px 20px; margin: 4px 0 20px; }
.detail dt { color: var(--muted); font-size: 14px; }
.detail dd { margin: 0; white-space: pre-line; }
.alloc { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 10px; align-items: end; border-top: 1px solid var(--line); padding-top: 18px; }
.alloc input { padding: 12px 14px; }
.alloc .btn { padding: 12px 18px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.inline-form { display: grid; gap: 10px; grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; align-items: end; margin-bottom: 2px; }
.inline-form.two { grid-template-columns: 1fr 1fr auto; }
.inline-form.upd { grid-template-columns: 1fr 2fr 170px auto; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; padding: 4px 8px; }
.icon-btn:hover { background: var(--fill); color: var(--danger); }
select.status-select { width: auto; padding: 8px 34px 8px 12px; font-size: 14px; background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

dialog { border: 0; padding: 0; background: transparent; color: var(--ink); }
dialog::backdrop { background: rgba(32, 17, 7, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog .login-card { background: var(--bg-2); gap: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .chapter .inner { grid-template-columns: 1fr; gap: 12px; }
  .grid-3, .stats, .tiles { grid-template-columns: 1fr 1fr; }
  .planning-grid { grid-template-columns: 1fr; }
  .inline-form, .inline-form.upd { grid-template-columns: 1fr 1fr; }
  .alloc { grid-template-columns: 1fr 1fr; }
  .story-hero { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .story-hero .coin { grid-column: 1; justify-self: center; grid-row: 2; }
  .story-hero .day, .story-hero .night { text-align: center; }
  .story-hero small { margin: 12px auto 0 !important; }
}
/* iPad (Figma: iPad Pro 11") */
@media (max-width: 900px) {
  .landing-foot .desc { max-width: 412px; }
}
/* iPhone (Figma: iPhone 14 & 15 Pro Max) */
@media (max-width: 640px) {
  .landing { grid-template-rows: auto 1fr auto; }
  .landing-foot { display: grid; grid-template-columns: 1fr auto; gap: 18px 16px; align-items: end; }
  .landing-foot .desc { grid-column: 1 / -1; max-width: none; }
  .login-layer { place-items: end center; }
  .login-card { max-width: none; }

  .topbar { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .brand img { height: 16px; }
  .tabs { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 16px; }
  .user { margin-left: auto; }
  .user .email { display: none; }
  .wrap { padding: 36px 16px 72px; }
  .chapter { padding: 72px 16px; }
  .grid-3, .grid-2, .stats, .tiles, .fields, .checks { grid-template-columns: 1fr; }
  .inline-form, .inline-form.two, .inline-form.upd, .alloc { grid-template-columns: 1fr; }
  .detail dl { grid-template-columns: 1fr; }
  .progress-card { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 22px 18px; }
}
