/* ==========================================================================
   SurfVault — Surf Tool Website CSS
   Theme: Retro Surf meets Modern Tech — Sunset gradient + Ocean depth
   ========================================================================== */

:root {
    --primary: #0b1744;
    --primary-light: #1a2d6b;
    --accent: #ff6b35;
    --accent2: #f7c948;
    --teal: #00c9b8;
    --text: #1a1a2e;
    --text-light: #6b7280;
    --white: #ffffff;
    --bg: #f0f4f8;
    --bg2: #e2e8f0;
    --card: #ffffff;
    --border: #e2e8f0;
    --radius: 16px;
    --shadow: 0 4px 24px rgba(11,23,68,0.10);
    --shadow-lg: 0 12px 48px rgba(11,23,68,0.18);
    --nav-bg: rgba(11,23,68,0.97);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* ---- Top Bar ---- */
.top-bar {
    background: linear-gradient(90deg, var(--primary) 0%, #1a3a8f 50%, var(--accent) 100%);
    color: white;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.top-bar::after {
    content: '';
    position: absolute;
    bottom: 0; left: -100%;
    width: 200%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* ---- Header ---- */
header {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--accent);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(255,107,53,0.5));
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.logo-text span { color: var(--accent2); }

.logo-sub {
    font-size: 0.62rem;
    color: var(--teal);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

nav { margin-left: auto; }

nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
}

nav a:hover, nav a.active {
    color: white;
    background: rgba(255,107,53,0.25);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    margin-left: auto;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .mobile-toggle { display: flex; }
    nav {
        display: none;
        position: absolute;
        top: 68px; left: 0; right: 0;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 16px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    nav.open { display: flex; }
    nav a { padding: 12px 16px; font-size: 1rem; }
    .header-inner { position: relative; }
}

/* ---- Hero ---- */
.hero {
    background: linear-gradient(160deg, #0b1744 0%, #1a3a8f 40%, #00c9b8 100%);
    color: white;
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.03' d='M0 160L60 165c120 10 240-5 360-30 120-25 240-45 360-20 120 25 240 95 360 110 120 15 240-5 360-50 120-45 240-125 360-130 120-5 240 55 360 60 120 5 120-65 240-65 0 0 0-25 0-25L1440 0H0z'/%3E%3C/svg%3E") bottom/cover no-repeat;
}

.hero-content { max-width: 780px; margin: 0 auto; position: relative; z-index: 1; }

.hero-wave {
    font-size: 4rem;
    margin-bottom: 16px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

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

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero h1 span { color: var(--accent2); }

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #e85d2d);
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 6px 24px rgba(255,107,53,0.4);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(255,107,53,0.5);
}

.btn-secondary {
    background: rgba(255,255,255,0.12);
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s;
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
}

/* ---- Stats Bar ---- */
.stats-bar {
    background: white;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 960px;
    margin: -40px auto 0;
    position: relative;
    z-index: 2;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.stat-item {
    padding: 28px 20px;
    text-align: center;
    border-right: 1px solid var(--border);
}

.stat-item:last-child { border-right: none; }

.stat-num {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .stats-bar { grid-template-columns: repeat(2, 1fr); margin: -30px 16px 0; }
    .stat-item:nth-child(2) { border-right: none; }
    .stat-item { border-bottom: 1px solid var(--border); }
}

/* ---- Sections ---- */
.section {
    padding: 80px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-subtitle {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--primary);
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1rem;
}

/* ---- Tools Grid ---- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.tool-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 24px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    border: 2px solid transparent;
    display: block;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--teal));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.tool-card:hover::before { transform: scaleX(1); }

.tool-icon {
    font-size: 2.6rem;
    margin-bottom: 14px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

.tool-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.tool-desc {
    font-size: 0.83rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ---- Articles Grid ---- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.article-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.article-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    background: rgba(255,107,53,0.1);
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}

.article-card h3 {
    font-size: 1rem;
    color: var(--primary);
    line-height: 1.4;
}

.article-card p {
    font-size: 0.83rem;
    color: var(--text-light);
    line-height: 1.6;
    flex: 1;
}

.article-meta {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---- CTA ---- */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #1a3a8f 100%);
    color: white;
    text-align: center;
    padding: 72px 24px;
}

.cta-section h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 14px;
}

.cta-section p {
    opacity: 0.85;
    max-width: 480px;
    margin: 0 auto 28px;
}

/* ---- Page Header ---- */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, #1a3a8f 100%);
    color: white;
    padding: 64px 24px;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.85;
    max-width: 520px;
    margin: 0 auto;
    font-size: 1rem;
}

/* ---- Article Page ---- */
.breadcrumb {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 24px;
    font-size: 0.82rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.breadcrumb span { margin: 0 6px; }

.article-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.article-page-header {
    margin-bottom: 32px;
    padding-top: 32px;
}

.article-page-header h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--primary);
    margin-bottom: 16px;
    line-height: 1.25;
}

.article-featured-img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 32px;
    display: block;
}

.article-body-text {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text);
}

.article-body-text p { margin-bottom: 20px; }

.article-body-text h2 {
    font-size: 1.5rem;
    margin: 36px 0 14px;
    color: var(--primary);
}

.article-body-text h3 {
    font-size: 1.2rem;
    margin: 28px 0 10px;
    color: var(--primary);
}

.article-body-text ul, .article-body-text ol {
    margin: 16px 0 20px 24px;
}

.article-body-text li { margin-bottom: 8px; }

.article-body-text strong { color: var(--primary); }

/* ---- Tool Page ---- */
.tool-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.tool-page-header {
    padding: 40px 0 32px;
}

.tool-page-header h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--primary);
    margin-bottom: 10px;
}

.tool-page-desc {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 640px;
}

.tool-calc {
    background: white;
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.calc-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--teal);
}

.calc-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), #e85d2d);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.35);
}

.result-box {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), #1a3a8f);
    border-radius: 12px;
    color: white;
    text-align: center;
    display: none;
}

.result-box.show { display: block; }

.result-label {
    font-size: 0.82rem;
    opacity: 0.8;
    margin-bottom: 6px;
}

.result-value {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent2);
}

.result-unit {
    font-size: 0.9rem;
    opacity: 0.85;
}

.result-note {
    margin-top: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
}

.info-box {
    background: rgba(0,201,184,0.08);
    border: 2px solid rgba(0,201,184,0.25);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 24px;
}

.info-box h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.info-box p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ---- About / Contact Pages ---- */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.page-content h2 {
    font-size: 1.6rem;
    color: var(--primary);
    margin: 32px 0 14px;
}

.page-content h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin: 24px 0 10px;
}

.page-content p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: var(--text);
}

.page-content ul {
    margin: 12px 0 20px 24px;
}

.page-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.page-content a {
    color: var(--accent);
    text-decoration: none;
}

.page-content a:hover { text-decoration: underline; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 32px;
}

.contact-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.contact-card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.contact-card p {
    font-size: 0.92rem;
    color: var(--text-light);
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* ---- Footer ---- */
footer {
    background: var(--primary);
    color: white;
    padding: 56px 24px 0;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand p {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 10px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.9rem;
    margin-bottom: 14px;
    color: var(--accent2);
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-col a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
    display: flex;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .footer-inner { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ---- 404 ---- */
.error-page {
    text-align: center;
    padding: 100px 24px;
}

.error-page .big-wave { font-size: 6rem; display: block; margin-bottom: 16px; }

.error-page h1 { font-size: 2rem; color: var(--primary); margin-bottom: 12px; }

.error-page p { color: var(--text-light); margin-bottom: 24px; }

/* ---- Forms ---- */
.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--teal);
}

.form-textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 130px;
    background: white;
    transition: border-color 0.2s;
}

.form-textarea:focus { outline: none; border-color: var(--teal); }

/* ---- Misc ---- */
img { max-width: 100%; }
a { color: inherit; }
