/*
  dailyshh — One-page dual-brand site (CrowmanCloud & Syncrovis)
  Author: Windsurf Cascade
*/

:root {
  /* Light mode enforced */
  --bg: #fbfcfe;
  --bg-elev: #ffffff;
  --text: #0a1623;
  --muted: #445567;
  --border: #e6eef5;
  --brand: #22c55e; /* common green */
  --brand-contrast: #062a25;
  --brand-2: #22c55e; /* unify */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-2: 0 20px 50px rgba(0,0,0,0.12);
  --container: 1200px;
  --pad: 16px;
  --glow-yellow: #facc15; /* amber/yellow */
}

/* Brand accents via attribute (set by JS) */
:root[data-active-theme="cmc"] { --brand: #22c55e; --brand-contrast: #052e16; }
:root[data-active-theme="sync"] { --brand: #22c55e; --brand-contrast: #052e16; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* Global animated yellow glow behind the entire screen */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  inset: -30% -30% auto -30%;
  height: 70vh;
  background: radial-gradient(700px 420px at 20% 15%, color-mix(in hsl, var(--glow-yellow), transparent 82%), transparent 62%);
  filter: blur(18px);
  animation: glow-drift 28s ease-in-out infinite alternate;
}
body::after {
  inset: auto -35% -25% auto;
  height: 80vh;
  background: radial-gradient(760px 460px at 80% 85%, color-mix(in hsl, var(--glow-yellow), transparent 86%), transparent 64%);
  animation-duration: 36s;
}

/* Ensure main content renders above background glow */
header, main, footer { position: relative; z-index: 1; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 calc(var(--pad) * 1.25);
}

.section {
  padding: 80px 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(150%) blur(10px);
  background: color-mix(in hsl, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header.is-scrolled {
  background: var(--bg-elev);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand-logo { display: block; height: 50px; width: auto; }
.brand-text {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, #ff6b6b 10%, #7c6cff 55%, #5eead4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav { display: flex; gap: 10px; }
.nav .nav-link {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.nav .nav-link:hover { border-color: color-mix(in hsl, var(--brand), var(--border) 70%); }

/* Mobile menu */
.hamburger { display: none; position: relative; width: 40px; height: 36px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev); cursor: pointer; align-items: center; justify-content: center; }
.hamburger .bar { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; position: relative; }
.hamburger .bar::before, .hamburger .bar::after { content: ""; position: absolute; width: 20px; height: 2px; background: var(--text); border-radius: 2px; left: 0; }
.hamburger .bar::before { top: -6px; }
.hamburger .bar::after { bottom: -6px; }

.mobile-menu { position: absolute; top: 68px; right: 12px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-2); padding: 8px; display: none; }
.mobile-menu.open { display: grid; gap: 6px; }
.mobile-menu-item { appearance: none; border: 1px solid var(--border); background: transparent; color: var(--text); padding: 10px 14px; border-radius: 10px; text-align: left; cursor: pointer; }
.mobile-menu-item:hover { border-color: color-mix(in hsl, var(--brand), var(--border) 60%); }

@media (max-width: 820px) {
  .nav { display: none; }
  .hamburger { display: inline-flex; }
}
@media (max-width: 520px) {
  .brand-logo { height: 32px; }
}

/* theme toggle removed for light-only */

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: -20% -20% auto -20%;
  height: 70%;
  background: radial-gradient(500px 300px at 30% 20%, color-mix(in hsl, var(--glow-yellow), transparent 70%), transparent 60%);
  filter: blur(14px);
  z-index: 0;
  animation: glow-drift 16s ease-in-out infinite alternate;
}
.hero::after {
  inset: auto -25% -25% auto;
  height: 80%;
  background: radial-gradient(520px 320px at 70% 60%, color-mix(in hsl, var(--glow-yellow), transparent 78%), transparent 62%);
  animation-duration: 22s;
}
.hero .grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; position: relative; z-index: 1; }
/* Centered variant when no image is used */
.hero--center .hero-center-wrap { max-width: 760px; margin: 0 auto; text-align: center; }
.hero--center .cta-row { justify-content: center; }
.hero--center { padding-top: 96px; padding-bottom: 64px; }
.headline { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; margin: 8px 0 12px; }
.subhead { color: var(--muted); margin-bottom: 24px; }
.cta-row { display: flex; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 700; border-radius: 9999px; padding: 12px 18px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; color: var(--text);
  transition: transform 120ms ease, box-shadow 160ms ease, filter 160ms ease, background-color 160ms ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid color-mix(in hsl, var(--brand), var(--bg) 70%); outline-offset: 2px; }
.btn-primary {
  background: var(--brand);
  color: #062e12;
  box-shadow: 0 6px 18px rgba(34,197,94,0.28);
}
.btn-primary:hover { filter: brightness(0.96); box-shadow: 0 8px 22px rgba(34,197,94,0.38); }
.btn-primary:active { filter: brightness(0.92); }
.btn-outline { background: transparent; border-color: var(--border); }
.btn-outline:hover { border-color: color-mix(in hsl, var(--brand), var(--border) 40%); background-color: color-mix(in hsl, var(--brand), var(--bg) 94%); }

.hero-card {
  min-height: 260px;
  border-radius: var(--radius);
  background:
    radial-gradient(200px 120px at 20% 30%, rgba(94, 234, 212, 0.18), transparent 60%),
    radial-gradient(220px 140px at 80% 40%, rgba(124,108,255,0.22), transparent 65%),
    linear-gradient(180deg, var(--bg-elev), color-mix(in hsl, var(--bg-elev), #000 4%));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  animation: float-card 8s ease-in-out infinite;
}

.hero-art { display: block; width: 100%; height: auto; }

/* Switcher */
.switcher {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  gap: 6px;
}
.brands .switcher { margin: 0 auto; }
.switcher-tab {
  appearance: none; border: 1px solid transparent; background: transparent; color: var(--text);
  padding: 10px 14px; border-radius: 10px; cursor: pointer; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.switcher-tab.is-active { background: color-mix(in hsl, var(--brand), var(--bg) 90%); border-color: color-mix(in hsl, var(--brand), var(--border) 75%); color: var(--text); }

/* Brand panel */
.brand-panel { display: none; margin-top: 22px; }
.brand-panel.is-active { display: block; }

.panel-hero {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
}
.panel-title { margin: 0 0 8px; font-size: 28px; }
.panel-desc { margin: 0; color: var(--muted); }
/* Default inline logo (e.g., Crowmancloud) */
.panel-logo { vertical-align: middle; margin-right: 8px; height: 28px; width: auto; }

/* Logo-only panel title variant */
.panel-title--logoOnly { display: flex; align-items: center; min-height: 52px; }
.panel-title--logoOnly .panel-logo { height: 44px; margin-right: 0; }

@media (min-width: 900px) {
  .panel-title--logoOnly .panel-logo { height: 52px; }
}
@media (max-width: 520px) {
  .panel-title--logoOnly .panel-logo { height: 36px; }
}

/* Tab logo and a11y */
.tab-logo { display: block; height: 18px; width: auto; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow-1);
}
.card h3 { margin-top: 4px; margin-bottom: 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
/* Icon inside cards */
.card-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in hsl, var(--brand), var(--bg) 94%); margin-bottom: 10px; }

/* Forms */
.contact-form {
  margin-top: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.contact-form h3 { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in hsl, var(--brand), var(--bg) 80%); outline-offset: 2px; }
.form-note { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* Add gap above submit buttons in forms */
.lead-form button[type="submit"],
.contact-form button[type="submit"] {
  margin-top: 12px;
}

/* Contact */
.contact .grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.contact-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.mini-cards { display: grid; grid-template-columns: 2fr 1.2fr; gap: 14px; margin-top: 12px; }
.mini {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 12px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mini-title { display: block; font-size: 12px; color: var(--muted); }
.mini-row { display: flex; align-items: center; gap: 8px; }
.mini-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in hsl, var(--brand), var(--bg) 94%); }
.mini-value { color: var(--text); font-weight: 600; text-decoration: none; }
.mini-value:hover { text-decoration: underline; }
.mini a.mini-value { color: var(--text); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 16px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 12px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* Utilities */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* About section */
.about-wrap { display: flex; flex-direction: column; gap: 18px; }
.about-header h2 { margin: 0 0 6px; }
.about-header p { margin: 0; color: var(--muted); }
/* Tighten spacing below About, around Brands, and above Contact */
.about { padding-bottom: 24px; }
.brands { padding-top: 24px; padding-bottom: 16px; }
.contact { padding-top: 24px; }

.about-grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.about-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.about-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: color-mix(in hsl, var(--brand), var(--border) 70%); }
.about-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in hsl, var(--brand), var(--bg) 92%); margin-bottom: 10px; }
.about-card h3 { margin: 6px 0 6px; font-size: 18px; }
.about-card p { margin: 0; color: var(--muted); }

.about-statbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.about-statbar .stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex; align-items: center; gap: 8px;
}
.about-statbar .stat strong { font-size: 18px; }
.about-statbar .stat span { color: var(--muted); font-size: 12px; }

.about-cta { margin-top: 4px; }

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@keyframes float-card {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@keyframes glow-drift {
  0% { transform: translate3d(0,0,0) scale(1); opacity: 0.6; }
  50% { transform: translate3d(0,-12px,0) scale(1.05); opacity: 0.7; }
  100% { transform: translate3d(0,8px,0) scale(0.98); opacity: 0.55; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero .grid-2 { grid-template-columns: 1fr; }
  .contact .grid-2 { grid-template-columns: 1fr; }
  .about-grid-cards { grid-template-columns: 1fr; }
  .about-statbar { grid-template-columns: 1fr; }
  .about { padding-bottom: 16px; }
  .brands { padding-top: 16px; padding-bottom: 12px; }
  .contact { padding-top: 16px; }
}
@media (max-width: 780px) {
  .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .mini-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .lead-form, .contact-form { padding: 16px; }
  .lead-form button[type="submit"], .contact-form button[type="submit"] { width: 100%; }
  .mini-cards { grid-template-columns: 1fr; }
}
