/* Ourcloud design system: the tokens of Family's home/assets/home.css (colours, type, radii), as admin/assets/admin.css,
   and the few pieces this site uses: the page «Lavori in corso» (index.html), a shop's page and its configuration
   (lib/pages.php). */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/BricolageGrotesque-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/BricolageGrotesque-latin-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #FBF7F2;        /* surface-100 */
  --card: #FFFFFF;      /* surface-card */
  --card-2: #EFE7DD;    /* surface-200 */
  --text: #1B2A4A;      /* ink */
  --muted: #6B5A4E;     /* ink-muted */
  --line: #E2D8CC;
  --action: #1B2A4A;
  --on-action: #FBF7F2;
  --focus: #B87853;
  --sun: #B87853;
  --danger: #B3261E;
  --ok: #2F7D5B;
  --field: #FFFFFF;
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121A2E; --card: #22335A; --card-2: #1B2A4A; --text: #FBF7F2; --muted: #C9D2E3; --line: #33466E; --action: #F29E6D; --on-action: #1B2A4A; --focus: #F29E6D; --sun: #F29E6D; --danger: #F2867E; --ok: #6CCB9C; --field: #1B2A4A; }
}
* { box-sizing: border-box; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; margin: 0; background: var(--bg); color: var(--text); line-height: 22px; -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible { border-radius: 999px; }
.muted { color: var(--muted); }

/* The bar at the top: the logo, with «shop»; on a shop's configuration «Vedi lo shop» and «Esci» */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; max-width: 960px; margin: 0 auto; padding: 20px 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 22px; letter-spacing: -.03em; line-height: 1; color: var(--text); text-decoration: none; }
.brand img { width: 40px; height: 28px; }
.brand b { font-weight: 800; }
.brand-site { margin-left: 2px; padding: 3px 8px; border-radius: 999px; background: var(--action); color: var(--on-action); font-size: 13px; font-weight: 700; letter-spacing: 0; }
.mark-dark { display: none; }
@media (prefers-color-scheme: dark) { .mark-light { display: none; } .mark-dark { display: block; } }
.bar-actions { display: flex; gap: 8px; }
.bar-actions form { margin: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  font: inherit; font-weight: 600; color: var(--text); background: transparent; box-shadow: inset 0 0 0 1.5px var(--text); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--card-2); }
.btn.primary { background: var(--action); color: var(--on-action); box-shadow: none; }
.btn.primary:hover { background: color-mix(in srgb, var(--action) 60%, var(--card)); }
@media (max-width: 480px) { .bar:has(.bar-actions) .brand > span[aria-hidden] { display: none; } .bar-actions .btn { padding: 0 14px; } } /* on a phone, beside the two buttons, the logo and «shop» */

/* In the middle of the page: where things stand, the title, the same in German, French and English */
main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; text-align: center; }
.status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 4px 12px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-size: 13px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
h1 { font-size: clamp(36px, 8vw, 56px); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; margin: 0 0 12px; }
.lead { margin: 0 0 32px; font-size: 18px; line-height: 26px; color: var(--muted); }
.langs { display: grid; gap: 10px; width: 100%; margin: 0; padding: 20px 24px; list-style: none; background: var(--card); border-radius: 20px; text-align: left; }
.langs li { display: flex; align-items: baseline; gap: 12px; }
/* A shop's page (lib/pages.php: render_shop): its name, what it sells, that it is being prepared */
.lead { overflow-wrap: anywhere; }
.soon { margin: 0; color: var(--muted); }
.code { flex: none; width: 28px; padding: 0 6px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-size: 11px; line-height: 18px; font-weight: 700; text-align: center; }

/* A shop's configuration (lib/pages.php: shop_admin): a page to work in, from the top, as admin.ourcloud.ch */
main.page { display: block; max-width: 640px; text-align: left; }
main.page h1 { font-size: clamp(32px, 6vw, 48px); margin-bottom: 4px; overflow-wrap: anywhere; }
main.page h1 + .muted { margin: 0 0 20px; }
.card { background: var(--card); border-radius: 20px; padding: 20px 24px; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; line-height: 16px; font-weight: 600; }
.field-note { margin: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.input { font: inherit; font-size: 15px; line-height: 22px; width: 100%; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--muted); background: var(--field); color: var(--text); margin: 0; resize: vertical; }
.input:focus { outline: none; border-color: var(--focus); }
.address { justify-self: start; font-weight: 600; overflow-wrap: anywhere; }
.form-actions { display: flex; justify-content: flex-end; }
/* A message after saving: over the page at the top, light words on green or red (as admin.ourcloud.ch) */
.flash { position: fixed; z-index: 50; top: calc(env(safe-area-inset-top) + 12px); left: 50%; width: max-content; max-width: min(560px, calc(100vw - 32px));
  margin: 0; padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 32px rgb(27 42 74 / .22); font-weight: 600; transform: translateX(-50%); animation: flash-out 6s ease forwards; }
.flash.ok { background: var(--ok); color: var(--bg); }
.flash.error { background: var(--danger); color: var(--bg); }
@keyframes flash-out { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* At the bottom: «Hosted in» with a small Swiss flag, as on Family */
.foot { display: flex; justify-content: center; padding: 0 16px 16px; }
.hosted-in { display: flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.swiss-flag { width: 14px; height: 14px; flex: none; }
