﻿/*
Theme Name: MelliYar Demo
Theme URI: https://gildedage.shop/melliyar/
Author: MelliYar
Description: Public preview for the MelliYar plugin. This theme is not part of the plugin package.
Version: 1.1.0
Text Domain: melliyar-demo
*/

:root {
	--ink: #14221f;
	--muted: #5d6d68;
	--line: #e4ddd0;
	--paper: #f6f3ec;
	--card: #fffdf9;
	--teal: #0f766e;
	--teal-deep: #115e59;
	--teal-dark: #0b3d3a;
	--mint: #d8f5ef;
	--amber: #b45309;
	--red: #b91c1c;
	--shadow: 0 30px 70px rgba(20, 40, 36, 0.14);
	font-family: "Vazirmatn", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
	margin: 0;
	color: var(--ink);
	background:
		radial-gradient(900px 480px at 8% 4%, rgba(45, 212, 191, 0.16), transparent 60%),
		radial-gradient(760px 460px at 92% 0%, rgba(15, 118, 110, 0.1), transparent 55%),
		linear-gradient(180deg, #f2faf7 0%, var(--paper) 34%, #fff 100%);
	font-family: "Vazirmatn", Tahoma, sans-serif;
	line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; }

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 40;
	background: rgba(255, 253, 249, 0.9);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid rgba(228, 221, 208, 0.9);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 20px; letter-spacing: 0; }
.mark {
	display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #f7f3ea;
	background: radial-gradient(circle at 28% 22%, rgba(204, 251, 241, 0.95), transparent 46%), linear-gradient(155deg, #2dd4bf 0%, #0f766e 48%, #134e4a 100%);
	box-shadow: 0 10px 22px rgba(15, 118, 110, 0.28);
}
.nav { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--ink); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
	font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.btn-sm { min-height: 42px; font-size: 14px; }
.btn-primary { color: #fff; background: linear-gradient(180deg, #149488 0%, var(--teal) 100%); box-shadow: 0 10px 20px rgba(15, 118, 110, 0.24); }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost { color: var(--ink); background: #fff; border-color: #ddd4c6; }
.btn-ghost:hover { border-color: var(--teal); }
.btn-white { color: var(--teal-dark); background: #fff; }
.btn-outline { color: #fff; background: transparent; border-color: rgba(255,255,255,.55); }

/* Hero */
.hero {
	display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
	gap: 44px; align-items: center; padding: 52px 0 30px;
}
.kicker {
	display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 12px;
	border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--teal-deep);
	font-size: 13px; font-weight: 700;
}
.kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(15,118,110,.15); }
h1 { margin: 0; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.3; letter-spacing: 0; font-weight: 700; }
h1 em { font-style: normal; color: var(--teal); }
.lead { margin: 18px 0 0; max-width: 38rem; color: var(--muted); font-size: 16.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.checks li { display: flex; align-items: center; gap: 7px; }
.checks svg { color: var(--teal); flex: 0 0 auto; }
.hero-mini { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.pill {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
	background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 500;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #78716c; box-shadow: 0 0 0 4px rgba(120,113,108,.14); }
.dot.off { background: #78716c; }
.dot.smart { background: var(--amber); box-shadow: 0 0 0 4px rgba(180,83,9,.14); }
.dot.national { background: var(--teal); box-shadow: 0 0 0 4px rgba(15,118,110,.16); }

/* Showcase: PC + mobile mockups */
.showcase { position: relative; padding: 58px 0 34px; }
.showcase-glow {
	position: absolute; inset: 4% -4% 0 8%; border-radius: 48px; pointer-events: none;
	background:
		radial-gradient(420px 260px at 18% 18%, rgba(45,212,191,.35), transparent 65%),
		radial-gradient(380px 280px at 85% 30%, rgba(15,118,110,.22), transparent 65%),
		linear-gradient(150deg, rgba(216,245,239,.85), rgba(255,253,249,.2));
}

.browser {
	position: relative; z-index: 2;
	border-radius: 20px; background: #fff; overflow: visible;
	box-shadow: var(--shadow), 0 0 0 1px rgba(20,34,31,.06);
}
.browser-bar {
	display: flex; align-items: center; gap: 12px;
	padding: 10px 14px; background: #fbf9f4; border-bottom: 1px solid #eee7da; border-radius: 20px 20px 0 0;
	direction: ltr;
}
.traffic { display: inline-flex; gap: 6px; }
.traffic i { width: 10px; height: 10px; border-radius: 50%; background: #e5ded0; }
.traffic i:nth-child(1) { background: #f2a49e; } .traffic i:nth-child(2) { background: #f2cf8f; } .traffic i:nth-child(3) { background: #9fd8bf; }
.browser-url {
	flex: 1; display: inline-flex; align-items: center; gap: 6px; justify-content: center;
	min-height: 28px; padding: 0 12px; border-radius: 8px; background: #fff; border: 1px solid #eee7da;
	color: var(--muted); font-size: 12px; direction: ltr; white-space: nowrap; overflow: hidden;
}
.live-badge {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
	background: var(--mint); color: var(--teal-deep); font-size: 12px; font-weight: 700; direction: rtl;
}
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15,118,110,.35); } 70% { box-shadow: 0 0 0 6px rgba(15,118,110,0); } 100% { box-shadow: 0 0 0 0 rgba(15,118,110,0); } }

.viewport { position: relative; overflow: hidden; background: #f4f1ea; }
.viewport-desktop { height: 520px; border-radius: 0 0 20px 20px; }
.viewport iframe { border: 0; background: #f4f1ea; transform-origin: top right; }
.frame-loading {
	position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px;
	color: var(--muted); font-weight: 500; font-size: 14px; background: #f4f1ea; text-align: center;
}
.frame-loading[hidden] { display: none; }
.spinner {
	width: 26px; height: 26px; border-radius: 50%; margin: 0 auto;
	border: 3px solid rgba(15,118,110,.18); border-top-color: var(--teal); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.device-caption { margin: 10px 4px 0; color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: center; }

/* Phone */
.phone {
	position: absolute; z-index: 3; left: -14px; bottom: 0;
	width: 196px; padding: 10px 10px 14px;
	border-radius: 38px; background: #101816;
	box-shadow: 0 28px 55px rgba(11, 30, 27, .32), inset 0 0 0 2px rgba(255,255,255,.08);
}
.phone-notch {
	position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4;
	width: 72px; height: 20px; border-radius: 999px; background: #101816;
}
.viewport-phone { height: 356px; border-radius: 28px; }
.viewport-phone iframe { transform-origin: top right; }
.frame-loading-sm { border-radius: 28px; }
.phone-home { width: 52px; height: 4px; margin: 9px auto 0; border-radius: 999px; background: rgba(255,255,255,.45); }
.device-caption-phone { color: rgba(255,255,255,.75); margin-top: 7px; }

/* Floating cards */
.float-card {
	position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px;
	padding: 11px 13px; border-radius: 16px; background: rgba(255,255,255,.96);
	border: 1px solid #fff; box-shadow: 0 18px 40px rgba(20,40,36,.15);
	animation: floaty 5s ease-in-out infinite;
}
.float-card small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.float-card strong { display: block; font-size: 13.5px; line-height: 1.5; max-width: 210px; }
.float-icon {
	display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px;
	color: var(--teal-deep); background: var(--mint);
}
.float-icon svg { width: 20px; height: 20px; }
.float-icon-ok { color: #047857; background: #d9f5e6; }
.float-connect { top: 4px; right: 22px; }
.float-mode { top: 118px; left: 196px; animation-delay: .8s; }
.float-ready { bottom: 44px; right: -10px; animation-delay: 1.5s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Stats */
.stats {
	display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 1px; overflow: hidden;
	margin: 6px 0 8px; border-radius: 18px; background: var(--line); border: 1px solid var(--line);
}
.stat { padding: 18px 12px; background: #fff; text-align: center; }
.stat strong { display: block; font-size: 30px; line-height: 1.2; letter-spacing: 0; color: var(--teal-deep); }
.stat span { color: var(--muted); font-size: 12.5px; font-weight: 500; }

/* Sections */
.section { padding: 34px 0 8px; }
.eyebrow { margin: 0 0 6px; color: var(--teal); font-size: 13px; font-weight: 700; }
.section h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: 0; }
.section .intro { margin: 0 0 22px; max-width: 44rem; color: var(--muted); }
.card {
	padding: 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
	box-shadow: 0 12px 32px rgba(28,25,21,.04);
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card.is-live { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }

.modes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.mode-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mode-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #f1ece2; color: #78716c; }
.mode-icon-smart { background: #fdf0dd; color: var(--amber); }
.mode-icon-national { background: var(--mint); color: var(--teal-deep); }
.live-tag { padding: 4px 9px; border-radius: 999px; background: var(--mint); color: var(--teal-deep); font-size: 11.5px; font-weight: 700; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; padding: 0; list-style: none; }
.chip { padding: 5px 10px; border-radius: 999px; background: #f4f1ea; border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.chip-open { background: #e7f6ee; border-color: #bfe8d2; color: #065f46; }
.chip-block { background: #fdeeee; border-color: #f3c2c2; color: var(--red); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.bento-wide { grid-column: span 1; }
@media (min-width: 981px) { .bento { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.feature-icon {
	display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px;
	border-radius: 12px; color: var(--teal-deep); background: var(--mint);
}
.host-rows, .file-rows { display: grid; gap: 8px; margin-top: 16px; }
.host-row, .file-row {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 9px 11px; border-radius: 11px; background: #fff; border: 1px solid #eee7da; font-size: 13px;
}
.tag { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.tag-block { background: #fdeeee; color: var(--red); }
.tag-open, .tag-local { background: #e7f6ee; color: #065f46; }

.gauge { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.gauge-ring {
	--p: 0; display: grid; place-items: center; flex: 0 0 84px; width: 84px; height: 84px; border-radius: 50%;
	background: conic-gradient(var(--teal) calc(var(--p) * 1%), #eee7da 0);
}
.gauge-ring span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; font-size: 22px; font-weight: 700; }
.gauge-meta { flex: 1; min-width: 0; }
.gauge-meta strong { display: block; font-size: 14px; }
.gauge-meta span { color: var(--muted); font-size: 12.5px; }
.bar { height: 8px; margin-top: 9px; border-radius: 999px; background: #eee7da; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2dd4bf, var(--teal)); }

.timeline { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.timeline li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.tl-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: #d6cfbf; box-shadow: 0 0 0 4px rgba(120,113,108,.12); }
.tl-dot.is-ok { background: var(--teal); box-shadow: 0 0 0 4px rgba(15,118,110,.14); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.step { position: relative; padding: 22px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.step-num {
	display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 50%;
	color: #fff; background: linear-gradient(160deg, #2dd4bf, var(--teal)); font-weight: 700; box-shadow: 0 8px 18px rgba(15,118,110,.25);
}
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* Strip + CTA */
.strip {
	display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); margin: 36px 0 20px; padding: 8px;
	border-radius: 18px; background: #fff; border: 1px solid var(--line);
}
.strip a { padding: 14px 8px; text-align: center; font-size: 13.5px; font-weight: 700; border-radius: 12px; }
.strip a:hover { color: var(--teal-deep); background: #f4faf8; }

.cta {
	display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
	margin: 18px 0 8px; padding: 26px; border-radius: 22px; color: #fff;
	background: radial-gradient(420px 220px at 12% 20%, rgba(45,212,191,.35), transparent 60%), linear-gradient(140deg, #115e59, var(--teal-dark));
	box-shadow: 0 24px 50px rgba(11,61,58,.28);
}
.cta h2 { margin: 0 0 6px; font-size: 24px; }
.cta p { margin: 0; color: rgba(255,255,255,.82); font-size: 14px; max-width: 34rem; }
.cta .actions { margin: 0; }

.site-footer { padding: 14px 0 36px; color: var(--muted); font-size: 13px; }

@media (max-width: 980px) {
	.nav { display: none; }
	.hero { grid-template-columns: 1fr; padding-top: 36px; }
	.modes, .steps { grid-template-columns: 1fr; }
	.bento { grid-template-columns: 1fr; }
	.stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.strip { grid-template-columns: 1fr 1fr 1fr; }
	.viewport-desktop { height: 460px; }
	.phone { width: 168px; left: -6px; }
	.viewport-phone { height: 304px; }
	.float-mode { left: 150px; }
	.float-connect { right: 8px; }
	.float-ready { display: none; }
}

@media (max-width: 640px) {
	.wrap { width: min(1180px, calc(100% - 28px)); }
	.actions .btn { width: 100%; }
	.cta .btn { width: 100%; }
	.strip { grid-template-columns: 1fr 1fr; }
	.viewport-desktop { height: 400px; }
	.phone { width: 138px; border-radius: 30px; padding: 8px 8px 10px; }
	.viewport-phone { height: 248px; border-radius: 22px; }
	.phone-notch { width: 52px; height: 15px; }
	.float-card { padding: 8px 10px; }
	.float-card strong { font-size: 12px; max-width: 150px; }
	.float-connect { top: 4px; }
	.float-mode { display: none; }
	.browser-url { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
	.float-card, .live-badge i { animation: none; }
	.spinner { animation-duration: 2s; }
}
