/* Global styles for the public marketing site (landing, pricing, docs, legal pages, contact/tenant-request forms).
   Loaded by resources/views/layouts/public.blade.php. */

:root {
    --bg: #0b1020;
    --panel: #11182e;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --brand: #4f46e5;
    --brand-2: #06b6d4;
    --accent: #22d3ee;
    --code-bg: #0f172a;
    --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; color: var(--ink); background: #fff;
    font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Navbar */
.nav {
    position: sticky; top: 0; z-index: 20;
    background: rgba(11,16,32,.92); backdrop-filter: blur(8px);
    border-bottom: 1px solid #1e293b;
}
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: #fff; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand .logo-mark { width: 32px; height: 32px; display: block; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; margin-inline-start: auto; }
.nav-links a { color: #cbd5e1; font-size: .95rem; font-weight: 500; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a.active { color: #fff; }
.btn {
    display: inline-block; border-radius: 8px; padding: .55rem 1rem; font-weight: 600;
    font-size: .92rem; cursor: pointer; border: 1px solid transparent; transition: .15s;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { border-color: #334155; color: #e2e8f0; }
.btn-ghost:hover { background: #1e293b; text-decoration: none; color: #fff; }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 80% -10%, #1e293b, var(--bg)); color: #e5e7eb; }
.hero::before, .hero::after {
    content: "";
    position: absolute;
    inset: -20px;
    z-index: 0;
    pointer-events: none;
    background-repeat: repeat;
    transform-origin: center;
}
.hero::before {
    background-image:
        radial-gradient(1px 1px at 5% 15%, #fff, transparent 100%),
        radial-gradient(1px 1px at 12% 55%, #fff, transparent 100%),
        radial-gradient(1px 1px at 20% 30%, #fff, transparent 100%),
        radial-gradient(1px 1px at 28% 75%, #fff, transparent 100%),
        radial-gradient(1px 1px at 35% 10%, #fff, transparent 100%),
        radial-gradient(1px 1px at 42% 60%, #fff, transparent 100%),
        radial-gradient(1px 1px at 50% 35%, #fff, transparent 100%),
        radial-gradient(1px 1px at 58% 85%, #fff, transparent 100%),
        radial-gradient(1px 1px at 65% 20%, #fff, transparent 100%),
        radial-gradient(1px 1px at 72% 50%, #fff, transparent 100%),
        radial-gradient(1px 1px at 80% 8%, #fff, transparent 100%),
        radial-gradient(1px 1px at 87% 65%, #fff, transparent 100%),
        radial-gradient(1px 1px at 93% 40%, #fff, transparent 100%),
        radial-gradient(1px 1px at 98% 90%, #fff, transparent 100%),
        radial-gradient(1px 1px at 8% 92%, #fff, transparent 100%),
        radial-gradient(1px 1px at 45% 95%, #fff, transparent 100%);
    background-size: 180px 180px;
    opacity: .5;
    animation: hero-stars-drift-a 35s linear infinite, hero-stars-twinkle-a 2s ease-in-out infinite alternate, hero-stars-zoom-a 7s ease-in-out infinite alternate;
}
.hero::after {
    background-image:
        radial-gradient(1.8px 1.8px at 10% 25%, #fff 45%, rgba(147,197,253,.55) 70%, transparent 100%),
        radial-gradient(1.8px 1.8px at 22% 65%, #fff 45%, rgba(147,197,253,.55) 70%, transparent 100%),
        radial-gradient(2px 2px at 38% 15%, #fff 45%, rgba(147,197,253,.55) 70%, transparent 100%),
        radial-gradient(1.8px 1.8px at 55% 78%, #fff 45%, rgba(147,197,253,.55) 70%, transparent 100%),
        radial-gradient(2px 2px at 68% 40%, #fff 45%, rgba(147,197,253,.55) 70%, transparent 100%),
        radial-gradient(1.8px 1.8px at 80% 88%, #fff 45%, rgba(147,197,253,.55) 70%, transparent 100%),
        radial-gradient(2px 2px at 90% 20%, #fff 45%, rgba(147,197,253,.55) 70%, transparent 100%),
        radial-gradient(1.8px 1.8px at 6% 55%, #fff 45%, rgba(147,197,253,.55) 70%, transparent 100%),
        radial-gradient(2px 2px at 48% 50%, #fff 45%, rgba(147,197,253,.55) 70%, transparent 100%),
        radial-gradient(1.8px 1.8px at 95% 60%, #fff 45%, rgba(147,197,253,.55) 70%, transparent 100%);
    background-size: 260px 260px;
    opacity: .8;
    animation: hero-stars-drift-b 48s linear infinite reverse, hero-stars-twinkle-b 2.6s ease-in-out infinite alternate, hero-stars-zoom-b 9s ease-in-out infinite alternate;
    animation-delay: 0s, .6s, 1.5s;
}
@keyframes hero-stars-drift-a {
    from { background-position: 0 0; }
    to { background-position: 180px 180px; }
}
@keyframes hero-stars-drift-b {
    from { background-position: 0 0; }
    to { background-position: -260px 130px; }
}
@keyframes hero-stars-twinkle-a {
    from { opacity: .15; }
    to { opacity: .75; }
}
@keyframes hero-stars-twinkle-b {
    from { opacity: .4; }
    to { opacity: 1; }
}
@keyframes hero-stars-zoom-a {
    from { transform: scale(1); }
    to { transform: scale(1.25); }
}
@keyframes hero-stars-zoom-b {
    from { transform: scale(1.18); }
    to { transform: scale(0.88); }
}
@media (prefers-reduced-motion: reduce) {
    .hero::before, .hero::after { animation: none; transform: none; }
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: .5rem; align-items: center; padding: 4.5rem 0; }
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 1rem; }
.hero h1 { font-size: 2.7rem; line-height: 1.12; margin: 0 0 1rem; color: #fff; letter-spacing: -.02em; }
.hero p.lead { font-size: 1.15rem; color: #aeb8c6; margin: 0 0 1.75rem; }
.hero-cta { display: flex; gap: .85rem; flex-wrap: wrap; }
.hero-art { display: flex; justify-content: center; }

/* Sections */
section { padding: 4rem 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: 1.9rem; margin: 0 0 .6rem; letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.alt { background: #f8fafc; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
.card .ic { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(135deg, #eef2ff, #ecfeff); display: grid; place-items: center; font-size: 1.2rem; margin-bottom: .9rem; }
.card h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Public forms (contact / tenant request) */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2rem; max-width: 660px; margin: 0 auto; }
.form-card .fg { margin-bottom: 1.15rem; }
.form-card label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.form-card input:not([type=checkbox]), .form-card select, .form-card textarea {
    width: 100%; box-sizing: border-box; padding: .55rem .75rem; font: inherit; font-size: .95rem;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.form-card .hint { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.form-card .field-err { color: #dc2626; font-size: .85rem; margin-top: .3rem; }
.form-card .hint.ok { color: #16a34a; }
.form-card .hint.bad { color: #dc2626; }
/* Honeypot: hidden from humans, present for bots. Not display:none —
   some bots skip fields that are display:none. */
.hp-field { position: absolute !important; left: -9999px; top: -9999px; height: 1px; width: 1px; overflow: hidden; }
.alert-ok { max-width: 660px; margin: 0 auto 1.5rem; border-inline-start: 4px solid #16a34a; background: #f0fdf4; color: #166534; padding: .85rem 1rem; border-radius: 0 8px 8px 0; }

.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.feature-split h3 { font-size: 1.45rem; margin: 0 0 .8rem; letter-spacing: -.01em; }
.feature-split > div > p { color: var(--muted); margin: 0 0 .5rem; }
.checklist { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .55rem; }
.checklist li { padding-inline-start: 1.7rem; position: relative; font-size: .97rem; }
.checklist li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: #16a34a; font-weight: 700; }

.cta { text-align: center; background: radial-gradient(1200px 600px at 80% -10%, #1e293b, var(--bg)); color: #e5e7eb; border-radius: 18px; padding: 3rem 1.5rem; }
.cta h2 { margin: 0 0 .6rem; font-size: 1.8rem; }
.cta p { margin: 0 0 1.5rem; opacity: .92; }
.cta .btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }

/* Footer */
footer { background: var(--bg); color: #94a3b8; padding: 2.5rem 0; border-top: 1px solid #1e293b; }
footer .foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .9rem; }

/* Legal pages (Terms of Use / Privacy Policy) */
.legal-doc { max-width: 760px; margin: 0 auto; }
.legal-doc h1 { margin: 0 0 .3rem; font-size: 2rem; letter-spacing: -.01em; }
.legal-doc .meta { color: var(--muted); margin: 0 0 2rem; font-size: .92rem; }
.legal-doc h2 { margin: 2.2rem 0 .8rem; font-size: 1.2rem; }
.legal-doc p { margin: 0 0 1rem; color: #374151; }
.legal-doc ul { margin: 0 0 1.1rem; padding-inline-start: 1.4rem; }
.legal-doc li { margin: 0 0 .5rem; color: #374151; }

/* Code */
pre { background: var(--code-bg); color: #e2e8f0; padding: 1rem 1.1rem; border-radius: 10px; overflow-x: auto; font-size: .86rem; line-height: 1.55; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
p code, li code, td code { background: #eef2ff; color: #3730a3; padding: .1rem .35rem; border-radius: 5px; font-size: .86em; }

/* Docs layout */
.docs { display: grid; grid-template-columns: 248px 1fr; gap: 2.5rem; padding: 2.5rem 0 4rem; }
.docs-side { position: sticky; top: 84px; align-self: start; }
.docs-side .sg { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .6rem; font-weight: 700; }
.docs-side ul { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.docs-side li a { display: block; padding: .45rem .9rem; color: #475569; font-size: .95rem; margin-inline-start: -2px; border-inline-start: 2px solid transparent; }
.docs-side li a:hover { color: var(--brand); text-decoration: none; }
.docs-side li a.active { color: var(--brand); font-weight: 600; border-inline-start-color: var(--brand); }
.docs-body { min-width: 0; }
.docs-body h1 { margin: 0 0 .3rem; font-size: 2rem; letter-spacing: -.01em; }
.docs-body .sub { color: var(--muted); margin: 0 0 2rem; font-size: 1.05rem; }
.docs-body h2 { margin: 2.2rem 0 .8rem; font-size: 1.3rem; padding-top: .5rem; }
.docs-body h3 { margin: 1.6rem 0 .5rem; font-size: 1.05rem; }
.docs-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .92rem; }
.docs-body th, .docs-body td { border: 1px solid var(--line); padding: .55rem .75rem; text-align: start; vertical-align: top; }
.docs-body th { background: #f8fafc; }
.method { font-family: ui-monospace, monospace; font-weight: 700; font-size: .8rem; padding: .15rem .5rem; border-radius: 5px; }
.m-get { background: #dcfce7; color: #166534; }
.m-post { background: #dbeafe; color: #1e40af; }
.m-put { background: #fef9c3; color: #854d0e; }
.m-del { background: #fee2e2; color: #991b1b; }
.note { border-inline-start: 4px solid var(--brand-2); background: #ecfeff; padding: .85rem 1rem; border-radius: 0 8px 8px 0; margin: 1.25rem 0; font-size: .95rem; }
.code-tabs { margin: 1rem 0; }
.code-tabs-bar { display: flex; flex-wrap: wrap; gap: .25rem; }
.code-tabs-bar button { border: 1px solid var(--line); border-bottom: 0; background: #f8fafc; color: #475569; font: inherit; font-size: .82rem; padding: .35rem .8rem; border-radius: 8px 8px 0 0; cursor: pointer; }
.code-tabs-bar button.active { background: var(--code-bg); color: #e2e8f0; border-color: var(--code-bg); }
.code-tabs pre { margin: 0; border-radius: 0 10px 10px 10px; }
.docs-nav { display: flex; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
    .hero { padding: 15px; }
    .hero-grid { grid-template-columns: minmax(0,1fr); gap: 2rem; padding: 3rem 0; }
    .hero-art { order: -1; margin-block: 1.5rem 2rem; }
    .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
    .feature-split { grid-template-columns: 1fr; }
    .docs { grid-template-columns: 1fr; }
    .docs-side { position: static; }
    .docs-side ul { display: flex; flex-wrap: wrap; border-left: 0; }
    .hero h1 { font-size: 2.1rem; }
}
@media (max-width: 560px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Mobile nav: collapse the links into a toggled dropdown instead of
   letting them overflow the sticky header. */
.nav-toggle {
    display: none; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; margin-inline-start: auto;
    border: 1px solid #334155; border-radius: 8px; background: transparent; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: #e2e8f0; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle span + span { margin-top: 4px; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute; top: 100%; inset-inline: 0;
        flex-direction: column; align-items: stretch; gap: .25rem;
        margin-inline-start: 0; max-height: 0; overflow: hidden; opacity: 0;
        background: #0b1020; border-bottom: 1px solid #1e293b;
        padding: 0 1.25rem; transition: max-height .25s ease, opacity .2s ease;
    }
    .nav-links.open { max-height: 70vh; overflow-y: auto; opacity: 1; padding-block: .5rem 1.25rem; }
    .nav-links a { padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
    .nav-links .btn { margin-top: .5rem; text-align: center; }
}
