/* ============================================================
   Yaniv Score Keeper · vintage playing-card design system
   Parchment tones · high-contrast serifs · suit ornaments
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;0,900;1,500;1,600&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

:root {
    --paper:        #f1e6c9;   /* warm parchment ground            */
    --paper-deep:   #e6d6ad;   /* shaded parchment                 */
    --card-face:    #faf3e0;   /* light card stock                 */
    --card-face-2:  #f6ecd4;
    --ink:          #241b12;   /* sepia-black ink                  */
    --ink-soft:     #5d4d36;   /* muted text                       */
    --suit-red:     #9d2a23;   /* hearts & diamonds, deep vintage  */
    --suit-red-br:  #b6322a;
    --gold:         #b08534;   /* brass rule lines & accents       */
    --gold-soft:    #cba75d;
    --line:         #cdb88a;   /* hairline rules                   */
    --shadow:       rgba(54, 38, 18, 0.22);

    --serif-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --serif-body:    'EB Garamond', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--serif-body);
    font-size: 19px;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--paper);
    /* layered parchment: soft vignette + faint grain overlay */
    background-image:
        radial-gradient(ellipse at 50% -10%, rgba(255,250,235,0.85), rgba(255,250,235,0) 55%),
        radial-gradient(ellipse at 100% 100%, rgba(176,133,52,0.10), rgba(176,133,52,0) 60%),
        radial-gradient(ellipse at 0% 90%, rgba(157,42,35,0.06), rgba(157,42,35,0) 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-attachment: fixed, fixed, fixed, scroll;
    -webkit-font-smoothing: antialiased;
}

/* ---------- shared ornaments ---------- */
.suit-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--gold);
    margin: 0 auto;
    max-width: 320px;
}
.suit-rule::before,
.suit-rule::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.suit-rule span { font-size: 0.95em; letter-spacing: 2px; }
.suit-rule .heart, .suit-rule .diamond { color: var(--suit-red); }

/* ---------- hero ---------- */
.hero {
    position: relative;
    text-align: center;
    padding: 92px 24px 70px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255,252,242,0.7), rgba(255,252,242,0) 60%);
}
/* faint oversized suits drifting behind the title */
.hero::before,
.hero::after {
    content: "♠";
    position: absolute;
    font-family: var(--serif-display);
    color: rgba(36, 27, 18, 0.05);
    font-size: 22rem;
    line-height: 1;
    pointer-events: none;
    z-index: 0;
}
.hero::before { content: "♥"; top: -3rem; left: -2rem; color: rgba(157,42,35,0.06); transform: rotate(-12deg); }
.hero::after  { content: "♣"; bottom: -5rem; right: -2rem; transform: rotate(10deg); }

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

.hero .suit-crest {
    font-size: 1.4rem;
    letter-spacing: 0.5em;
    color: var(--gold);
    margin-bottom: 18px;
    padding-left: 0.5em;
}
.hero .suit-crest .r { color: var(--suit-red); }

.hero h1 {
    font-family: var(--serif-display);
    font-weight: 800;
    font-size: clamp(2.8rem, 7vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
.hero .tagline {
    font-family: var(--serif-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.15rem, 2.6vw, 1.6rem);
    color: var(--suit-red);
    margin: 18px 0 10px;
}
.hero .sub {
    font-size: 1.12rem;
    color: var(--ink-soft);
    max-width: 540px;
    margin: 0 auto;
}
.hero .cta-buttons { margin-top: 38px; }

/* ---------- buttons (card-stock) ---------- */
.btn {
    display: inline-block;
    font-family: var(--serif-display);
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: 0.02em;
    padding: 14px 34px;
    margin: 8px;
    text-decoration: none;
    border-radius: 4px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-primary {
    background: var(--ink);
    color: var(--card-face);
    border: 1px solid var(--ink);
    box-shadow: 0 4px 14px var(--shadow);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 24px var(--shadow); }
.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--card-face); transform: translateY(-3px); }
.btn-red {
    background: var(--suit-red);
    color: var(--card-face);
    border: 1px solid var(--suit-red);
    box-shadow: 0 4px 14px var(--shadow);
}
.btn-red:hover { transform: translateY(-3px); box-shadow: 0 10px 24px var(--shadow); background: var(--suit-red-br); }

/* ---------- nav ---------- */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(241, 230, 201, 0.94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(255,255,255,0.4), 0 4px 14px rgba(54,38,18,0.06);
}
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 14px 16px;
    align-items: center;
}
nav li { margin: 4px 0; display: flex; align-items: center; }
nav li:not(:last-child)::after {
    content: "♦";
    color: var(--gold-soft);
    margin: 0 4px;
    font-size: 0.7rem;
    opacity: 0.7;
}
nav a {
    font-family: var(--serif-display);
    font-size: 1rem;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    padding: 4px 14px;
    transition: color 0.2s;
}
nav a:hover { color: var(--suit-red); }

/* ---------- layout ---------- */
.container { max-width: 1140px; margin: 0 auto; padding: 78px 24px; }

.section-head { text-align: center; margin-bottom: 54px; }
.section-title {
    font-family: var(--serif-display);
    font-weight: 700;
    font-size: clamp(2rem, 4.4vw, 2.9rem);
    color: var(--ink);
    line-height: 1.1;
}
.section-kicker {
    font-family: var(--serif-display);
    font-style: italic;
    color: var(--suit-red);
    font-size: 1.1rem;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}
.section-intro {
    max-width: 620px;
    margin: 16px auto 0;
    color: var(--ink-soft);
    font-size: 1.08rem;
}

/* ---------- feature cards (playing cards) ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 30px;
}
.feature-card {
    position: relative;
    background: linear-gradient(160deg, var(--card-face), var(--card-face-2));
    padding: 38px 34px 34px;
    border-radius: 10px;
    border: 1px solid var(--line);
    box-shadow: 0 2px 0 rgba(255,255,255,0.6) inset, 0 8px 22px rgba(54,38,18,0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}
/* inner hairline frame, like a card border */
.feature-card::before {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    pointer-events: none;
    opacity: 0.7;
}
/* corner suit index, like a card pip */
.feature-card .pip {
    position: absolute;
    top: 14px;
    right: 18px;
    font-family: var(--serif-display);
    font-size: 1.5rem;
    line-height: 1;
    color: var(--ink);
    opacity: 0.55;
}
.feature-card .pip.red { color: var(--suit-red); }
.feature-card:hover {
    transform: translateY(-8px) rotate(-0.6deg);
    box-shadow: 0 2px 0 rgba(255,255,255,0.6) inset, 0 18px 36px rgba(54,38,18,0.20);
}
.feature-icon {
    font-family: var(--serif-display);
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 16px;
    color: var(--ink);
}
.feature-icon.red { color: var(--suit-red); }
.feature-card h3 {
    font-family: var(--serif-display);
    font-weight: 700;
    font-size: 1.42rem;
    color: var(--ink);
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}
.feature-card p { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- rules panel ---------- */
.rules-section {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255,251,240,0.6), rgba(255,251,240,0) 60%),
        var(--paper-deep);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.rule-card {
    max-width: 780px;
    margin: 0 auto;
    background: linear-gradient(160deg, var(--card-face), var(--card-face-2));
    border: 1px solid var(--gold-soft);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 12px 34px rgba(54,38,18,0.18);
}
.rule-card-inner {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 44px clamp(24px, 5vw, 56px);
}
.rule-card h3 {
    text-align: center;
    font-family: var(--serif-display);
    font-weight: 700;
    font-size: 1.7rem;
    margin-bottom: 4px;
}
.rule-card .rule-sub {
    text-align: center;
    font-style: italic;
    color: var(--ink-soft);
    margin-bottom: 28px;
}
.rule-list { list-style: none; }
.rule-list li {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px dashed var(--line);
    align-items: baseline;
}
.rule-list li:last-child { border-bottom: none; }
.rule-list .mark {
    font-family: var(--serif-display);
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
    width: 1.4em;
    text-align: center;
}
.rule-list .mark.red { color: var(--suit-red); }
.rule-list .mark.black { color: var(--ink); }
.rule-list strong { font-weight: 600; color: var(--ink); }
.rule-list .rule-body { color: var(--ink-soft); }

/* ---------- game lengths ---------- */
.lengths {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 820px;
    margin: 0 auto;
}
.length-card {
    text-align: center;
    background: linear-gradient(160deg, var(--card-face), var(--card-face-2));
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 40px 30px;
    box-shadow: 0 8px 22px rgba(54,38,18,0.12);
    position: relative;
}
.length-card .big {
    font-family: var(--serif-display);
    font-weight: 800;
    font-size: 3.4rem;
    line-height: 1;
    color: var(--suit-red);
}
.length-card .label {
    font-family: var(--serif-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 10px 0 6px;
}
.length-card p { color: var(--ink-soft); }

/* ---------- getting started (numbered) ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}
.step-card {
    background: linear-gradient(160deg, var(--card-face), var(--card-face-2));
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 36px 30px;
    box-shadow: 0 8px 22px rgba(54,38,18,0.12);
    position: relative;
}
.step-card .num {
    font-family: var(--serif-display);
    font-weight: 800;
    font-size: 2.6rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 10px;
}
.step-card h3 { font-family: var(--serif-display); font-weight: 700; font-size: 1.3rem; margin-bottom: 10px; }
.step-card p { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- faq ---------- */
.faq-section {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255,251,240,0.5), rgba(255,251,240,0) 55%),
        var(--paper-deep);
    border-top: 1px solid var(--line);
}
.faq-item {
    max-width: 800px;
    margin: 0 auto 18px;
    background: linear-gradient(160deg, var(--card-face), var(--card-face-2));
    border: 1px solid var(--line);
    border-left: 3px solid var(--suit-red);
    border-radius: 8px;
    padding: 24px 28px;
    box-shadow: 0 4px 14px rgba(54,38,18,0.08);
}
.faq-item h3 {
    font-family: var(--serif-display);
    font-weight: 700;
    font-size: 1.22rem;
    color: var(--ink);
    margin-bottom: 8px;
}
.faq-item h3::before { content: "♠ "; color: var(--ink); opacity: 0.5; }
.faq-item:nth-child(even) h3::before { content: "♥ "; color: var(--suit-red); opacity: 0.7; }
.faq-item p { color: var(--ink-soft); }

/* ---------- support ---------- */
.support-section {
    background: var(--ink);
    color: var(--card-face);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.support-section::before {
    content: "♣";
    position: absolute;
    font-family: var(--serif-display);
    font-size: 26rem;
    color: rgba(250,243,224,0.04);
    bottom: -6rem; left: -2rem;
    pointer-events: none;
}
.support-section .section-title { color: var(--card-face); }
.support-section .section-kicker { color: var(--gold-soft); }
.support-section .section-intro { color: rgba(250,243,224,0.78); }
.support-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 26px;
    max-width: 940px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.support-card {
    background: rgba(250,243,224,0.06);
    border: 1px solid rgba(203,167,93,0.35);
    border-radius: 10px;
    padding: 34px 28px;
}
.support-card h3 { font-family: var(--serif-display); font-weight: 700; font-size: 1.3rem; margin-bottom: 10px; }
.support-card p { color: rgba(250,243,224,0.75); }

/* ---------- footer ---------- */
footer {
    background: var(--paper-deep);
    color: var(--ink-soft);
    text-align: center;
    padding: 48px 22px;
    border-top: 1px solid var(--line);
}
footer .crest {
    font-family: var(--serif-display);
    font-size: 1.1rem;
    letter-spacing: 0.4em;
    color: var(--gold);
    margin-bottom: 12px;
    padding-left: 0.4em;
}
footer .crest .r { color: var(--suit-red); }
footer .tagline { font-style: italic; color: var(--ink); margin-bottom: 4px; }
.footer-links { margin-top: 18px; }
.footer-links a {
    color: var(--ink);
    text-decoration: none;
    margin: 0 14px;
    font-family: var(--serif-display);
    font-weight: 600;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--suit-red); }

/* ---------- inner page content ---------- */
.page-content { max-width: 880px; margin: 0 auto; padding: 70px 24px 40px; }
.page-content > h1 {
    font-family: var(--serif-display);
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 2.9rem);
    color: var(--ink);
    margin-bottom: 8px;
}
.page-content .meta { color: var(--ink-soft); font-style: italic; margin-bottom: 30px; }
.page-content h2 {
    font-family: var(--serif-display);
    font-weight: 700;
    color: var(--ink);
    margin-top: 40px;
    margin-bottom: 14px;
    font-size: 1.6rem;
}
.page-content h2::before { content: "♦ "; color: var(--suit-red); font-size: 0.8em; }
.page-content p { margin-bottom: 14px; }
.page-content ul { margin: 16px 0 16px 8px; list-style: none; }
.page-content li { margin-bottom: 10px; padding-left: 1.6em; position: relative; }
.page-content li::before { content: "♣"; position: absolute; left: 0; color: var(--gold); font-size: 0.85em; top: 0.15em; }
.page-content a { color: var(--suit-red); font-weight: 600; }
.page-content .lead { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 8px; }

.callout {
    margin-top: 48px;
    padding: 30px 32px;
    background: linear-gradient(160deg, var(--card-face), var(--card-face-2));
    border: 1px solid var(--gold-soft);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(54,38,18,0.1);
}
.callout h3 { font-family: var(--serif-display); font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.callout p { margin-bottom: 0; color: var(--ink-soft); }

/* ---------- tutorials ---------- */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    margin-top: 36px;
}
.tutorial-card {
    background: linear-gradient(160deg, var(--card-face), var(--card-face-2));
    border: 1px solid var(--line);
    border-top: 3px solid var(--suit-red);
    border-radius: 10px;
    padding: 32px 30px;
    box-shadow: 0 8px 22px rgba(54,38,18,0.1);
}
.tutorial-card h3 {
    font-family: var(--serif-display);
    font-weight: 700;
    color: var(--ink);
    font-size: 1.3rem;
    margin-bottom: 16px;
}
.tutorial-card ol { margin-left: 1.1em; }
.tutorial-card li { margin-bottom: 10px; color: var(--ink-soft); padding-left: 0.2em; }
.tutorial-card li::marker { color: var(--suit-red); font-family: var(--serif-display); font-weight: 700; }

.tips-panel {
    margin-top: 58px;
    padding: 46px 40px;
    background: var(--ink);
    color: var(--card-face);
    border-radius: 12px;
    text-align: center;
}
.tips-panel h2 { font-family: var(--serif-display); color: var(--card-face); margin-bottom: 8px; }
.tips-panel h2::before { content: none; }
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 28px;
    margin-top: 30px;
    text-align: left;
}
.tips-grid h3 { font-family: var(--serif-display); margin-bottom: 8px; color: var(--gold-soft); }
.tips-grid p { color: rgba(250,243,224,0.8); }

/* ---------- motion: staggered hero reveal ---------- */
@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero .suit-crest,
.hero h1,
.hero .tagline,
.hero .sub,
.hero .cta-buttons {
    opacity: 0;
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero .suit-crest { animation-delay: 0.05s; }
.hero h1          { animation-delay: 0.18s; }
.hero .tagline    { animation-delay: 0.32s; }
.hero .sub        { animation-delay: 0.44s; }
.hero .cta-buttons{ animation-delay: 0.56s; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto; }
    .hero .suit-crest, .hero h1, .hero .tagline, .hero .sub, .hero .cta-buttons { opacity: 1; }
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
    body { font-size: 18px; }
    .container { padding: 56px 20px; }
    nav ul { gap: 2px; }
    nav li:not(:last-child)::after { margin: 0 2px; }
    nav a { padding: 4px 9px; }
    .rule-card-inner { padding: 32px 22px; }
    .tutorial-grid { grid-template-columns: 1fr; }
    .hero::before, .hero::after { font-size: 13rem; }
}
