/*
Theme Name: Canvastia
Theme URI: https://canvastia.com
Author: Canvastia
Description: Minimal dark-first theme for the Canvastia properties. It owns almost no chrome on purpose — the AI Studio plugin renders its own navigation and landing, and this theme just gives them a full-bleed dark page on the shared design tokens.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.2
Text Domain: canvastia
*/

/* Page-level frame only. Everything else is the plugin's design system
   (canvastia-ds.css), which the plugin enqueues itself. */

:root {
  --ca-bg: #131315;
  --ca-bg-deep: #0e0e10;
  --ca-surface: #1d1d1f;
  --ca-border: #333336;
  --ca-ink: #f4f4f6;
  --ca-ink-muted: #a8a8ad;
  --ca-muted: #7c7c82;
  --ca-accent: #f5b52e;
  --ca-accent-strong: #e59a15;
  --ca-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.canvastia {
  margin: 0;
  background: var(--ca-bg-deep);
  color: var(--ca-ink);
  font: 15px/1.65 var(--ca-font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Boxed layout: the whole site sits in a centred column and the deep-ground
   body colour shows down the sides. */
.ca-shell {
  max-width: 1320px;
  margin-inline: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ca-bg);
  border-inline: 1px solid var(--ca-border);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1320px) {
  .ca-shell { border-inline: 0; box-shadow: none; }
}

a { color: var(--ca-accent); }

img { max-width: 100%; height: auto; }

.ca-skip {
  position: absolute;
  left: -9999px;
}
.ca-skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--ca-surface);
  color: var(--ca-ink);
  padding: 10px 14px;
  border-radius: 8px;
}

/* Slim site header. Hidden on the landing page, which carries the plugin's
   own full navigation. */
.ca-siteheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  padding: 0 clamp(16px, 4vw, 32px);
  border-bottom: 1px solid var(--ca-border);
  background: var(--ca-bg-deep);
}

.ca-siteheader.is-hidden { display: none; }

.ca-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ca-ink);
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.9px;
}

.ca-wordmark__mark { height: 27px; width: auto; display: block; }

.ca-sitenav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
}

.ca-sitenav a {
  color: var(--ca-ink-muted);
  text-decoration: none;
}
.ca-sitenav a:hover { color: var(--ca-ink); }

.ca-sitenav .ca-cta {
  padding: 8px 14px;
  border-radius: 7px;
  background: var(--ca-accent-strong);
  color: #fff;
  font-weight: 550;
}
.ca-sitenav .ca-cta:hover { filter: brightness(1.12); }

/* The page body. Full-bleed: the plugin's sections set their own max-width. */
.ca-main {
  flex: 1;
  min-height: 0;
}

.ca-main--framed {
  max-width: 1200px;
  margin-inline: auto;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 32px) 80px;
}

.ca-main--framed h1.entry-title {
  margin: 0 0 24px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
}

/* Footer */
.ca-sitefooter {
  border-top: 1px solid var(--ca-border);
  background: var(--ca-bg-deep);
  color: var(--ca-muted);
  font-size: 12px;
  padding: 22px clamp(16px, 4vw, 32px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.ca-sitefooter a { color: var(--ca-ink-muted); text-decoration: none; }
.ca-sitefooter a:hover { color: var(--ca-ink); }

@media (max-width: 600px) {
  .ca-sitenav { gap: 14px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Yasal sayfa modalı */
.ca-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ca-modal[hidden] { display: none; }
.ca-modal__box { position: relative; background: #1b1b1f; color: #eee; width: min(760px, 100%); max-height: 86vh; overflow: hidden; display: flex; flex-direction: column; border-radius: 24px; padding: 32px 12px 20px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.ca-modal__x { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.ca-modal__x:hover { background: rgba(255,255,255,.2); }
.ca-modal__title { margin: 0 40px 16px 0; font-size: 22px; }
.ca-modal__body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 16px; text-align: justify; hyphens: auto; line-height: 1.6; font-size: 15px; }
.ca-modal__body p, .ca-modal__body li { text-align: justify; }
.ca-modal__body a { color: inherit; text-decoration: underline; }
