/* ── GoToAppleMaps Global Styles ──
   Canonical tokens extracted from index.html :root.
   Linked by all 4 HTML pages. Page-specific styles remain inline.
*/

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
    --bg: #050505;
    --bg-elevated: #111111;
    --bg-card: #0d0d0d;
    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.15);
    --text-primary: #f5f5f7;
    --text-secondary: rgba(255,255,255,0.55);
    --text-tertiary: rgba(255,255,255,0.35);
    --accent: #0A84FF;
    --accent-green: #30D158;
    --accent-orange: #FF9F0A;
    --accent-red: #FF453A;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ── Focus-visible ── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* ── Skip-to-content ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 200;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

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

/* ── Navigation ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(5,5,5,0.72);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
    padding: 8px 0;
    min-height: 44px;
}

.nav-brand img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a[aria-current="page"] { color: var(--text-primary); }

.nav-cta {
    font-size: 13px !important;
    color: var(--text-primary) !important;
    background: rgba(255,255,255,0.1);
    padding: 10px 18px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 99px;
    transition: background 0.2s;
}

.nav-cta:hover { background: rgba(255,255,255,0.16) !important; }

/* ── Hamburger (CSS-only, <768px) ── */
.nav-toggle { display: none; }
.nav-hamburger {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.nav-hamburger span,
.nav-hamburger span::before,
.nav-hamburger span::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
    position: relative;
}
.nav-hamburger span::before,
.nav-hamburger span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
}
.nav-hamburger span::before { top: -6px; }
.nav-hamburger span::after  { top:  6px; }

/* Open state */
.nav-toggle:checked ~ .nav-hamburger span { background: transparent; }
.nav-toggle:checked ~ .nav-hamburger span::before {
    top: 0;
    transform: rotate(45deg);
    background: var(--text-primary);
}
.nav-toggle:checked ~ .nav-hamburger span::after {
    top: 0;
    transform: rotate(-45deg);
    background: var(--text-primary);
}

.nav-menu-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5,5,5,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    padding: 24px;
    flex-direction: column;
    gap: 4px;
}

.nav-menu-overlay a {
    display: flex;
    align-items: center;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
    min-height: 52px;
}
.nav-menu-overlay a:last-child { border-bottom: none; }
.nav-menu-overlay a:hover { color: var(--text-primary); }

.nav-toggle:checked ~ .nav-menu-overlay {
    display: flex;
}

@media (max-width: 767px) {
    .nav-hamburger { display: flex; }
    .nav-links { display: none; }
}

@media (min-width: 768px) {
    .nav-menu-overlay { display: none !important; }
}

/* ── Footer ── */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.8;
}

footer a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

footer a:hover { color: var(--text-primary); }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    padding: 8px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* ── Related Tools ── */
.related-tools {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.related-tools h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.related-tool-card {
    display: block;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
}

.related-tool-card:hover { border-color: var(--border-hover); }

.related-tool-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.related-tool-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
