
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #101114;
    color: #ffffff;
    line-height: 1.6;
}

/* Navigation */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 6%;
    background: #15171b;
    border-bottom: 1px solid #292c32;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo span {
    color: #f97316;
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    color: #b8bbc2;
    text-decoration: none;
    font-size: 15px;
    transition: 0.2s;
}

nav a:hover {
    color: #f97316;
}

/* Homepage Hero */

.hero {
    text-align: center;
    padding: 120px 20px;
    background: radial-gradient(
        ellipse at top,
        #30241d 0%,
        #17191e 45%,
        #101114 80%
    );
}

.hero h1 {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero p {
    color: #a1a1aa;
    font-size: 18px;
    max-width: 650px;
    margin: 0 auto 35px;
}

.button {
    display: inline-block;
    background: #f97316;
    color: #101114;
    padding: 14px 30px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
}

.button:hover {
    background: #fb923c;
    transform: translateY(-2px);
}

/* Calculator Section */

.tools {
    max-width: 1300px;
    margin: auto;
    padding: 60px 6% 100px;
}

.tools h2 {
    font-size: 30px;
    margin-bottom: 30px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit, minmax(240px, 1fr)
    );
    gap: 20px;
}

.tool-card {
    background: #1b1d22;
    border: 1px solid #30333a;
    border-radius: 12px;
    padding: 28px;
    transition: 0.25s;
}

.tool-card:hover {
    border-color: #f97316;
    transform: translateY(-5px);
    box-shadow: 0 8px 30px #00000040;
}

.tool-card h3 {
    font-size: 21px;
    margin-bottom: 12px;
}

.tool-card p {
    color: #a1a1aa;
    font-size: 15px;
    margin-bottom: 25px;
}

.tool-card span {
    color: #f97316;
    font-size: 13px;
    font-weight: bold;
}

/* Footer */

footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #292c32;
    color: #777b85;
    font-size: 14px;
}

/* Mobile Compatibility */

@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    .hero {
        padding: 80px 20px;
    }

    .tools {
        padding: 40px 20px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }
}

/* Tire Calculator */

.calculator {
    max-width: 1000px;
    margin: auto;
    padding: 60px 20px;
}

.calculator h1 {
    font-size: clamp(30px, 5vw, 42px);
    margin-bottom: 10px;
}

.subtitle {
    color: #a1a1aa;
    margin-bottom: 30px;
}

.tire-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-card {
    background: #1b1d22;
    border: 1px solid #30333a;
    border-radius: 12px;
    padding: 25px;
}

.input-card h2 {
    color: #f97316;
    margin-bottom: 20px;
}

.input-card label {
    display: block;
    color: #b8bbc2;
    margin-bottom: 6px;
    font-size: 14px;
}

.input-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    background: #101114;
    border: 1px solid #393c43;
    border-radius: 6px;
    color: white;
    font-size: 18px;
    outline: none;
}

.input-card input:focus {
    border-color: #f97316;
}

.calculate-btn {
    width: 100%;
    margin-top: 25px;
    border: none;
    cursor: pointer;
    font-size: 17px;
}

.results {
    margin: 30px 0;
    overflow-x: auto;
}

.results table {
    width: 100%;
    border-collapse: collapse;
    background: #1b1d22;
}

.results th,
.results td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #30333a;
}

.results th {
    color: #f97316;
}

.result-highlight {
    color: #f97316;
    font-weight: bold;
}

@media (max-width: 600px) {
    .tire-inputs {
        grid-template-columns: 1fr;
    }

    .results th,
    .results td {
        padding: 10px;
        font-size: 13px;
    }
}
.tool-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
/* Visual Tire Comparison */

.tire-visual {
    background: #1b1d22;
    border: 1px solid #30333a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.tire-visual svg {
    display: block;
    width: 100%;
    max-width: 650px;
    height: auto;
    margin: auto;
}

/* Tire Width Comparison */

.tire-visual h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 20px;
}

.width-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.width-summary div {
    background: #101114;
    border: 1px solid #30333a;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
}

.width-summary p {
    color: #a1a1aa;
    font-size: 14px;
}

.width-summary h3 {
    color: #f97316;
    font-size: 26px;
    margin-top: 5px;
}

/* Compact Combined Tire Comparison */

.results {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
}

.results > .tire-visual {
    min-width: 0;
    margin-bottom: 0;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.results > .tire-visual:first-child {
    border-radius: 12px 0 0 12px;
    border-right: none;
}

.results > .tire-visual:nth-child(2) {
    border-radius: 0 12px 12px 0;
}

.tire-visual svg {
    max-height: 250px;
    width: 100%;
}

.tire-visual h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.width-summary {
    gap: 8px;
    margin-top: 10px;
}

.width-summary div {
    padding: 8px;
}

.width-summary p {
    font-size: 12px;
}

.width-summary h3 {
    font-size: 18px;
}

.results > table {
    grid-column: 1 / -1;
    margin-top: 20px;
}

/* Mobile Layout */

@media (max-width: 600px) {
    .results {
        grid-template-columns: 1fr;
    }

    .results > .tire-visual:first-child {
        border-radius: 12px 12px 0 0;
        border-right: 1px solid #30333a;
        border-bottom: none;
    }

    .results > .tire-visual:nth-child(2) {
        border-radius: 0 0 12px 12px;
    }

    .tire-visual svg {
        max-height: 200px;
    }
}

/* Compact Calculator Layout */

.calculator {
    max-width: 1200px;
    padding: 25px 20px;
}

.calculator h1 {
    font-size: 32px;
    margin-bottom: 5px;
}

.calculator .subtitle {
    font-size: 14px;
    margin-bottom: 15px;
}

.tire-inputs {
    gap: 12px;
}

.input-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 5px;
    padding: 15px;
}

.input-card h2 {
    grid-column: 1 / -1;
    font-size: 18px;
    margin-bottom: 5px;
}

.input-card label {
    grid-row: 2;
    font-size: 12px;
    margin-bottom: 0;
}

.input-card input {
    grid-row: 3;
    min-width: 0;
    padding: 8px;
    margin-bottom: 0;
    font-size: 16px;
}

.calculate-btn {
    margin-top: 12px;
    padding: 10px;
    font-size: 15px;
}

.results {
    margin: 15px 0;
}

.results > .tire-visual {
    padding: 10px;
}

.tire-visual svg {
    max-height: 190px;
}

.tire-visual h2 {
    font-size: 16px;
    margin-bottom: 5px;
}

.width-summary {
    margin-top: 5px;
}

.width-summary div {
    padding: 5px;
}

.width-summary h3 {
    font-size: 16px;
    margin-top: 0;
}

.results > table {
    margin-top: 12px;
}

.results th,
.results td {
    padding: 8px 12px;
    font-size: 14px;
}

/* Mobile Compatibility */

@media (max-width: 600px) {
    .calculator {
        padding: 20px 12px;
    }

    .calculator h1 {
        font-size: 26px;
    }

    .input-card {
        column-gap: 8px;
        padding: 12px;
    }

    .input-card label {
        font-size: 11px;
    }

    .results th,
    .results td {
        padding: 8px;
        font-size: 12px;
    }
}
/* Align Tire Comparison Panels */

.results > .tire-visual {
    justify-content: flex-start;
}

.results > .tire-visual svg {
    height: 190px;
    width: 100%;
}

.results > .tire-visual .width-summary {
    margin-top: auto;
}/* Tire Format Selector */

.tire-format {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    background: #101114;
    color: #ffffff;
    border: 1px solid #393c43;
    border-radius: 6px;
    padding: 8px;
    font-size: 14px;
    margin-bottom: 5px;
    cursor: pointer;
}

.tire-format:focus {
    outline: none;
    border-color: #f97316;
}

.input-card label {
    grid-row: 3;
}

.input-card input {
    grid-row: 4;
}.speed-input {
    width: 85px;
    max-width: 100%;
    padding: 6px 8px;
    background: #101114;
    color: white;
    border: 1px solid #393c43;
    border-radius: 5px;
    font-size: 14px;
}

.speed-input:focus {
    outline: none;
    border-color: #f97316;
}/* Wheel Offset Calculator Inputs */

.input-card:not(:has(.tire-format)) label {
    grid-row: 2;
}

.input-card:not(:has(.tire-format)) input {
    grid-row: 3;
}
/* Wheel Offset Calculator */

.calculate-btn {
    background: #f97316;
    color: #101114;
    border: none;
    border-radius: 6px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
}

.calculate-btn:hover {
    background: #fb923c;
}

.wheel-summary {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wheel-summary > div {
    background: #1b1d22;
    border: 1px solid #393c43;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
}

.wheel-summary h3 {
    color: #f97316;
    font-size: 28px;
    margin: 8px 0;
}

.wheel-summary p {
    color: #a1a1aa;
    font-size: 14px;
}

/* Visual Wheel Offset Comparison */

.wheel-visual {
    grid-column: 1 / -1;
    background: #1b1d22;
    border: 1px solid #393c43;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.wheel-visual h2 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 5px;
}

.wheel-visual svg {
    display: block;
    width: 100%;
    max-width: 850px;
    height: auto;
    max-height: 230px;
    margin: auto;
}

.wheel-summary {
    margin-bottom: 5px;
}

.wheel-summary > div {
    padding: 10px;
}

.wheel-summary h3 {
    font-size: 24px;
    margin: 4px 0;
}

/* Wheel Diagram Legend */

.wheel-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding-top: 10px;
    border-top: 1px solid #393c43;
    font-size: 12px;
    color: #a1a1aa;
}

.wheel-legend span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.wheel-legend i {
    display: inline-block;
    width: 24px;
}

.legend-mount {
    border-top: 3px solid #f97316;
}

.legend-center {
    border-top: 2px dashed #f97316;
}

.legend-hub {
    border-top: 2px dashed #d4d4d8;
}

.legend-spacer {
    height: 10px;
    background: #71717a;
    border: 1px solid #d4d4d8;
}
/* Spacer Unit Selector */

.spacer-field {
    grid-row: 3;
    display: flex;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
}

.spacer-field input {
    flex: 1;
    width: 100%;
    min-width: 0;
}

.spacer-field select {
    width: auto;
    padding: 6px;
    background: #24262c;
    color: white;
    border: 1px solid #52525b;
    border-radius: 5px;
    cursor: pointer;
}
/* Calculator Information */

.calculator-notes {
    background: #1b1d22;
    border: 1px solid #393c43;
    border-radius: 10px;
    padding: 24px;
    margin-top: 25px;
}

.calculator-notes h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

.calculator-notes h3 {
    color: #f97316;
    font-size: 16px;
    margin-top: 16px;
    margin-bottom: 5px;
}

.calculator-notes p {
    color: #b8bbc2;
    font-size: 14px;
    line-height: 1.7;
}

.disclaimer {
    color: #a1a1aa;
    font-size: 12px;
    margin-top: 12px;
}
/* Logo Link Colors */

a.logo,
a.logo:visited,
a.logo:hover,
a.logo:active {
    color: #ffffff;
    text-decoration: none;
}

a.logo span {
    color: #f97316;
}
/* Horsepower Conversion */

.hp-converter {
    margin-top: 25px;
}

.hp-converter h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.hp-converter .input-card {
    margin-bottom: 12px;
}

.hp-converter select {
    grid-row: 3;
    width: 100%;
    min-width: 0;
    padding: 8px;
    background: #101114;
    color: white;
    border: 1px solid #393c43;
    border-radius: 6px;
    font-size: 16px;
}

.hp-converter select:focus {
    outline: none;
    border-color: #f97316;
}

/* Transmission Presets */

.transmission-presets {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 5px;
}

.transmission-presets select {
    width: 100%;
    min-width: 0;
    padding: 8px;
    background: #101114;
    color: white;
    border: 1px solid #393c43;
    border-radius: 6px;
    font-size: 14px;
}

.transmission-presets select:focus {
    outline: none;
    border-color: #f97316;
}

.transmission-presets select:disabled {
    opacity: 0.5;
}

.input-card:has(.transmission-presets) label {
    grid-row: 3;
}

.input-card:has(.transmission-presets) input {
    grid-row: 4;
}

#transRatio[readonly] {
    color: #f97316;
}

/* RPM Speed Comparison */

.rpm-comparison {
    grid-column: 1 / -1;
    background: #1b1d22;
    border: 1px solid #393c43;
    border-radius: 10px;
    padding: 18px;
    margin-top: 15px;
}

.rpm-comparison h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.rpm-row {
    display: grid;
    grid-template-columns: 65px 1fr 100px;
    align-items: center;
    gap: 12px;
    margin: 9px 0;
    font-size: 13px;
}

.rpm-track {
    background: #30333a;
    height: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.rpm-fill {
    background: #f97316;
    height: 100%;
    border-radius: 4px;
}

.rpm-row strong {
    color: #f97316;
    text-align: right;
}

@media (max-width: 600px) {
    .rpm-row {
        grid-template-columns: 50px 1fr 85px;
        gap: 8px;
        font-size: 12px;
    }
}
/* Axle Regearing Calculator */

.regear-calculator {
    margin-top: 25px;
}

.regear-calculator h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.regear-calculator .input-card {
    margin-bottom: 12px;
}

.regear-calculator .subtitle {
    margin-bottom: 12px;
}
/* =================================
   GARAGEFORMULA HOMEPAGE
   ================================= */

.homepage .home-hero {
    text-align: center;
    padding: 75px 20px 65px;
    border-bottom: 1px solid #292c32;

    background-image:
        radial-gradient(
            ellipse at top,
            #f9731610,
            transparent 65%
        ),
        linear-gradient(
            #ffffff04 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            #ffffff04 1px,
            transparent 1px
        );

    background-size:
        100% 100%,
        40px 40px,
        40px 40px;
}

.hero-eyebrow {
    color: #f97316;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 18px;
}

.home-hero h1 {
    font-size: clamp(42px, 6vw, 76px);
    font-weight: 900;
    letter-spacing: -3px;
    line-height: 1.05;
    margin-bottom: 22px;
}

.home-hero h1 span {
    color: #f97316;
}

.home-hero p {
    color: #a1a1aa;
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 25px;
}

.home-hero .button {
    padding: 13px 26px;
}

.hero-benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 25px;
    margin-top: 25px;
    font-size: 13px;
    color: #a1a1aa;
}

.hero-benefits span::before {
    content: "\2713";
    color: #f97316;
    margin-right: 6px;
}

/* Homepage Calculator Cards */

.home-tools {
    max-width: 1450px;
    margin: auto;
    padding: 45px 5%;
}

.home-tools > h2 {
    font-size: 30px;
    margin-bottom: 4px;
    letter-spacing: -0.8px;
}

.section-description {
    color: #a1a1aa;
    font-size: 15px;
    margin-bottom: 25px;
}

.home-tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.home-tool-card {
    display: flex;
    flex-direction: column;
    background: #1b1d22;
    border: 1px solid #30333a;
    border-radius: 12px;
    padding: 22px;
    color: #ffffff;
    text-decoration: none;
    transition: border-color 0.2s,
                background 0.2s,
                transform 0.2s;
}

.home-tool-card:visited {
    color: #ffffff;
}

.home-tool-card:hover {
    border-color: #f97316;
    background: #202228;
    transform: translateY(-3px);
}

.tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f9731612;
    border: 1px solid #f9731625;
    border-radius: 10px;
    margin-bottom: 18px;
}

.tool-icon svg {
    width: 27px;
    height: 27px;
    stroke: #f97316;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.home-tool-card h3 {
    font-size: 19px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.home-tool-card p {
    color: #a1a1aa;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 22px;
}

.card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #f97316;
    font-size: 13px;
    font-weight: bold;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #30333a;
}

.card-action span {
    font-size: 20px;
}

/* About Section */

.home-about {
    background: #15171b;
    border: 1px solid #30333a;
    border-radius: 12px;
    margin-top: 30px;
    padding: 25px;
}

.home-about h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.home-about p {
    color: #a1a1aa;
    font-size: 15px;
    max-width: 850px;
    line-height: 1.8;
}

/* Homepage Footer */

.home-footer {
    padding: 35px 20px;
}

.home-footer .logo {
    display: inline-block;
    font-size: 21px;
    margin-bottom: 8px;
}

.home-footer p {
    font-size: 13px;
    color: #a1a1aa;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin: 20px 0;
}

.footer-links a {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 13px;
}

.footer-links a:hover {
    color: #f97316;
}

/* Tablet Compatibility */

@media (max-width: 1050px) {
    .home-tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile Compatibility */

@media (max-width: 600px) {

    .homepage .home-hero {
        padding: 50px 20px 40px;
    }

    .home-hero h1 {
        font-size: 44px;
        letter-spacing: -2px;
    }

    .hero-eyebrow {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .home-hero p {
        font-size: 15px;
    }

    .home-tools {
        padding: 30px 16px;
    }

    .home-tools > h2 {
        font-size: 25px;
    }

    .home-tool-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .home-tool-card {
        padding: 20px;
    }

    .hero-benefits {
        font-size: 11px;
        gap: 8px 15px;
    }
}
.calculator-notes a {
    color: #f97316;
    text-decoration: none;
}

.calculator-notes a:hover {
    text-decoration: underline;
}
.site-footer {
    padding: 25px 20px;
    border-top: 1px solid #292c32;
    text-align: center;
}

.site-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 18px;
}

.site-footer-links a {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.site-footer-links a:hover {
    color: #f97316;
}

.site-footer p {
    color: #777b85;
    font-size: 13px;
    margin: 0;
}
