/* ============================================================
   Studio Canis — warm editorial design
   Brand: soft cream→blush gradient (from the logo), elegant
   Fraunces serif, generous whitespace, organic arch shapes.
   ============================================================ */

/* --- Self-hosted fonts (GDPR-friendly, no Google CDN) ------- */
@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('../assets/fonts/karla.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lekton';
  src: url('../assets/fonts/lekton.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lekton';
  src: url('../assets/fonts/lekton-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Design tokens (overridden from the CMS theme) ---------- */
:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Karla', 'Segoe UI', sans-serif;
  --c-text: #2b2420;
  --c-muted: #7a6f66;
  --c-bg: #fffaf4;
  --c-accent: #c2542e;
  --c-grad-from: #fdf3d1;
  --c-grad-to: #f9dcef;
  --shadow-soft: 0 24px 60px -24px rgba(80, 50, 30, .25);
  --header-h: 88px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Ambient gradient blobs — quiet echo of the logo */
.bg-blobs {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.bg-blobs::before, .bg-blobs::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
}
.bg-blobs::before {
  width: 60vmax; height: 60vmax; top: -28vmax; right: -18vmax;
  background: radial-gradient(circle, var(--c-grad-from), transparent 65%);
}
.bg-blobs::after {
  width: 55vmax; height: 55vmax; bottom: -25vmax; left: -18vmax;
  background: radial-gradient(circle, var(--c-grad-to), transparent 65%);
}

/* ============================================================
   Header / top bar
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--c-bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(43, 36, 32, .07);
}
.site-header .container {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
}
.brand img { width: 64px; height: 64px; border-radius: 50%; }
.brand-name {
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 600;
  letter-spacing: .01em;
}

/* Hamburger */
.burger {
  width: 48px; height: 48px; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  border-radius: 50%; transition: background .25s;
}
.burger:hover { background: rgba(43, 36, 32, .06); }
.burger span {
  display: block; width: 26px; height: 2px; background: var(--c-text);
  transition: transform .35s cubic-bezier(.6, .05, .2, 1), opacity .25s;
}
body.menu-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Full-screen menu overlay */
.menu-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: linear-gradient(160deg, var(--c-grad-from), var(--c-grad-to));
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
body.menu-open .menu-overlay { opacity: 1; visibility: visible; }
.menu-overlay nav { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.menu-overlay a {
  font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3.2rem);
  text-decoration: none; padding: 6px 20px; position: relative;
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s, transform .5s, color .3s;
}
body.menu-open .menu-overlay a { opacity: 1; transform: none; }
body.menu-open .menu-overlay a:nth-child(1) { transition-delay: .08s; }
body.menu-open .menu-overlay a:nth-child(2) { transition-delay: .16s; }
body.menu-open .menu-overlay a:nth-child(3) { transition-delay: .24s; }
body.menu-open .menu-overlay a:nth-child(4) { transition-delay: .32s; }
body.menu-open .menu-overlay a:nth-child(5) { transition-delay: .40s; }
body.menu-open .menu-overlay a:nth-child(6) { transition-delay: .48s; }
.menu-overlay a:hover { color: var(--c-accent); }
.menu-footnote {
  position: absolute; bottom: 28px; font-size: .85rem; color: var(--c-muted);
  display: flex; gap: 18px;
}
.menu-footnote a { font-family: var(--font-body); font-size: .85rem; opacity: 1; transform: none; padding: 0; }

main { padding-top: var(--header-h); min-height: 70vh; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: clamp(48px, 9vh, 110px) 0 clamp(40px, 7vh, 90px); }
.hero .container {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-kicker {
  text-transform: uppercase; letter-spacing: .22em; font-size: .8rem; font-weight: 700;
  color: var(--c-accent); margin: 0 0 18px;
}
.hero-title {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem); margin-bottom: 24px;
}
.hero-sub { font-size: 1.18rem; color: var(--c-muted); max-width: 34em; margin: 0 0 36px; }
/* Pill button in the logo gradient with black text, no border. */
.btn-primary {
  display: inline-block;
  background: linear-gradient(100deg, var(--c-grad-from), var(--c-grad-to));
  color: var(--c-text);
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 16px 36px; border-radius: 999px; text-decoration: none;
  border: none; outline: none; cursor: pointer;
  transition: transform .25s, box-shadow .25s, filter .25s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); filter: saturate(1.25); }

.hero-figure { position: relative; }
.hero-figure img {
  width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover;
  border-radius: 32px;
  box-shadow: var(--shadow-soft);
}

/* ============================================================
   Sections
   ============================================================ */
.section { padding: clamp(56px, 10vh, 120px) 0; scroll-margin-top: calc(var(--header-h) + 8px); }
.section-heading {
  font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: 18px;
}
.section-heading::after {
  content: ''; display: block; width: 56px; height: 3px; margin-top: 18px;
  background: linear-gradient(90deg, var(--c-grad-from), var(--c-grad-to));
}

/* About */
.about .container {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.about.image-right .container > .about-figure { order: 2; }
.about-figure { position: relative; }
.about-figure img {
  border-radius: 24px; aspect-ratio: 4/5; object-fit: cover; width: 100%;
  box-shadow: var(--shadow-soft);
}
.about-text p { margin: 0 0 1em; color: var(--c-text); }
.about-text { white-space: pre-line; }

/* Services */
.services-intro { color: var(--c-muted); max-width: 38em; margin-bottom: 48px; }
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px;
}
.service-card {
  background: #fff; border: 1px solid rgba(43, 36, 32, .06);
  border-radius: 22px; padding: 34px 28px 30px; position: relative; overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--c-grad-from), var(--c-grad-to));
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.service-icon { font-size: 2rem; margin-bottom: 14px; color: var(--c-text); }
.service-icon svg { width: 38px; height: 38px; display: block; }
.service-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.service-card p { margin: 0; color: var(--c-muted); font-size: .98rem; white-space: pre-line; }

/* Contact */
.contact { text-align: center; }
.contact .section-heading::after { margin-left: auto; margin-right: auto; }
.contact-text { color: var(--c-muted); max-width: 36em; margin: 0 auto 36px; }
.contact-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.contact-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid rgba(43, 36, 32, .1); border-radius: 999px;
  padding: 14px 28px; text-decoration: none; font-weight: 700;
  transition: transform .25s, box-shadow .25s;
}
.contact-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }

/* Impressum + simple pages */
.page { padding: clamp(48px, 8vh, 90px) 0; }
.page .container { max-width: 760px; }
.page-body { white-space: pre-line; }

/* Footer */
.site-footer {
  border-top: 1px solid rgba(43, 36, 32, .08);
  padding: 36px 0 44px; margin-top: 40px; font-size: .9rem; color: var(--c-muted);
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: var(--c-muted); text-decoration: none; margin-left: 18px; }
.site-footer a:hover { color: var(--c-accent); }

/* ============================================================
   Coming-soon page
   ============================================================ */
.coming-soon {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; position: relative;
  /* Light gray version of the brand gradient (only on this page). */
  background: linear-gradient(165deg, #f8f8f9 0%, #e2e3e7 100%);
}
.coming-soon .login-corner {
  position: absolute; top: 22px; right: 26px;
}
.coming-logo {
  width: clamp(180px, 32vw, 300px); height: auto; border-radius: 50%;
  box-shadow: 0 30px 80px -30px rgba(80, 50, 30, .35);
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.coming-title {
  font-family: 'Lekton', 'Courier New', monospace;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  text-transform: uppercase; letter-spacing: .14em;
  /* Generous gap below the logo — the title sits roughly where
     "Coming Soon" used to be. */
  margin: clamp(70px, 14vh, 140px) 0 6px;
  font-weight: 400;
}
.coming-subtitle {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--c-muted); margin: 0 0 22px;
}
.coming-text { max-width: 34em; color: var(--c-muted); margin: 0 auto; }
.coming-soon-badge {
  margin-top: 36px; text-transform: uppercase; letter-spacing: .14em;
  font-family: 'Lekton', 'Courier New', monospace;
  /* Slightly smaller than the title, same black type, bold. */
  font-size: clamp(1.4rem, 3.3vw, 2.2rem);
  font-weight: 700;
  color: var(--c-text);
}
/* Animated "Coming Soon..." dots: cycle 1 -> 2 -> 3 -> 1 ... */
.loading-dots::after {
  content: '.';
  display: inline-block; text-align: left; width: 3ch;
  animation: loadingDots 1.8s infinite;
}
@keyframes loadingDots {
  0%, 32%   { content: '.'; }
  33%, 65%  { content: '..'; }
  66%, 100% { content: '...'; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-dots::after { animation: none; content: '...'; }
}
.btn-ghost {
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(43, 36, 32, .14);
  border-radius: 999px; padding: 9px 22px; font-family: var(--font-body); font-weight: 700;
  font-size: .9rem; cursor: pointer; color: var(--c-text); text-decoration: none;
  transition: background .25s, transform .25s;
}
.btn-ghost:hover { background: #fff; transform: translateY(-1px); }

/* ============================================================
   Login page
   ============================================================ */
.login-wrap {
  min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: #fff; border-radius: 24px; box-shadow: var(--shadow-soft);
  padding: 44px 40px; width: 100%; max-width: 400px;
}
.login-card h2 { font-size: 1.9rem; }
.login-card label { display: block; font-size: .85rem; font-weight: 700; margin: 18px 0 6px; }
.login-card input {
  width: 100%; padding: 13px 16px; border: 1px solid rgba(43, 36, 32, .18); border-radius: 12px;
  font-family: var(--font-body); font-size: 1rem; background: var(--c-bg);
}
.login-card input:focus { outline: 2px solid var(--c-accent); border-color: transparent; }
.login-card .btn-primary { width: 100%; margin-top: 26px; }
.login-error { color: #b3261e; font-size: .9rem; margin-top: 14px; min-height: 1.2em; }

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .coming-logo { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Admin: toolbar, edit mode, panels
   ============================================================ */
.admin-bar {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 90;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center;
  background: #211c19; color: #fff; border-radius: 999px; padding: 10px 14px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .45); font-size: .88rem;
}
.admin-bar button {
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-family: var(--font-body);
  font-size: .88rem; font-weight: 700; transition: background .2s, border-color .2s;
  white-space: nowrap;
}
.admin-bar button:hover { background: rgba(255, 255, 255, .12); }
.admin-bar button.active { background: var(--c-accent); border-color: var(--c-accent); }
.admin-bar button.save-dirty { background: #2e7d32; border-color: #2e7d32; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(46, 125, 50, .25); } }
.admin-bar .mode-pill {
  padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .08em;
}
.admin-bar .mode-pill.live { background: #2e7d32; }
.admin-bar .mode-pill.soon { background: #8a6d00; }

/* Editable elements in edit mode */
body.edit-mode [data-edit] { cursor: pointer; position: relative; }
body.edit-mode [data-edit]:hover { outline: 2px dashed var(--c-accent); outline-offset: 4px; }
body.edit-mode [data-edit].editing { outline: 2px solid var(--c-accent); outline-offset: 4px; }
body.edit-mode .img-edit-btn {
  position: absolute; bottom: 12px; right: 12px; z-index: 5;
  background: #211c19; color: #fff; border: none; border-radius: 999px;
  padding: 9px 16px; font-size: .82rem; font-weight: 700; cursor: pointer;
}
.section-tools {
  display: none; position: absolute; top: 10px; right: 10px; z-index: 6; gap: 6px;
}
body.edit-mode .section-tools { display: flex; }
.section-tools button, .item-tools button {
  background: #211c19; color: #fff; border: none; border-radius: 8px;
  width: 32px; height: 32px; cursor: pointer; font-size: .9rem;
}
.item-tools { display: none; position: absolute; top: 8px; right: 8px; gap: 4px; }
body.edit-mode .item-tools { display: flex; }
body.edit-mode .section { position: relative; }
.add-service-btn {
  display: none; margin-top: 22px; background: transparent; border: 2px dashed rgba(43, 36, 32, .3);
  border-radius: 22px; padding: 20px; width: 100%; cursor: pointer; font-family: var(--font-body);
  font-weight: 700; color: var(--c-muted);
}
body.edit-mode .add-service-btn { display: block; }
.add-service-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* Style editor side panel */
.edit-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 340px; max-width: 92vw; z-index: 95;
  background: #fff; box-shadow: -16px 0 50px -20px rgba(0, 0, 0, .3);
  transform: translateX(105%); transition: transform .3s cubic-bezier(.6, .05, .2, 1);
  display: flex; flex-direction: column;
}
.edit-panel.open { transform: none; }
.edit-panel header {
  padding: 18px 22px; border-bottom: 1px solid rgba(43, 36, 32, .1);
  display: flex; justify-content: space-between; align-items: center;
}
.edit-panel header h3 { margin: 0; font-size: 1.15rem; }
.edit-panel header button { background: none; border: none; font-size: 1.4rem; cursor: pointer; }
.edit-panel .panel-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.edit-panel label { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); margin: 16px 0 6px; }
.edit-panel textarea, .edit-panel select, .edit-panel input[type="text"], .edit-panel input[type="number"] {
  width: 100%; padding: 10px 12px; border: 1px solid rgba(43, 36, 32, .18); border-radius: 10px;
  font-family: var(--font-body); font-size: .95rem; background: var(--c-bg);
}
.edit-panel textarea { min-height: 110px; resize: vertical; }
.edit-panel input[type="color"] { width: 100%; height: 40px; border: 1px solid rgba(43, 36, 32, .18); border-radius: 10px; padding: 3px; background: #fff; cursor: pointer; }
.edit-panel input[type="range"] { width: 100%; }
.edit-panel .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit-panel .hint { font-size: .8rem; color: var(--c-muted); margin-top: 6px; }
.edit-panel .panel-reset {
  margin-top: 20px; background: transparent; border: 1px solid rgba(43, 36, 32, .2);
  border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: .85rem; width: 100%;
}

/* Toast */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 99;
  background: #211c19; color: #fff; border-radius: 12px; padding: 12px 22px; font-size: .9rem;
  opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .hero .container, .about .container { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 420px; margin: 0 auto; width: 100%; }
  .about.image-right .container > .about-figure { order: 0; }
  .about-figure { max-width: 380px; margin: 0 auto; width: 100%; }
  .admin-bar { width: calc(100vw - 24px); border-radius: 20px; }
}
