@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap');

:root {
    --ink: #243437;
    --muted: #748081;
    --teal: #217c83;
    --line: #e2e8e5;
    --paper: #f8faf7;
    --mint: #eaf3ed;
    font-family: 'DM Sans',sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
}

button,select {
    font: inherit;
}

button,a,select {
    -webkit-tap-highlight-color: transparent;
}

button,select {
    cursor: pointer;
}

button {
    color: inherit;
}

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

button: focus-visible,a:focus-visible,select:focus-visible {
    outline: 3px solid #34969f;
    outline-offset: 5px;
}

button {
    transition: background .18s,border-color .18s,transform .18s;
}

button: hover {
    transform: translateY(-1px);
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    background: white;
    padding: 12px;
    z-index: 10;
}

.skip-link:focus {
    top: 12px;
}

.site-header {
    max-width: 1280px;
    margin: auto;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 44px;
    border-bottom: 1px solid var(--line);
    gap: 28px;
}

.brand {
    width: 200px;
    height: 100px;
    overflow: hidden;
    flex-shrink: 0;
}

.brand img {
    width: 200px;
    height: 150px;
    object-fit: contain;
    margin-top: -24px;
    mix-blend-mode: multiply;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 35px;
    font-size: 13px;
    font-weight: 600;
}

.site-header nav a {
    padding: 12px 0;
}

.nav-active {
    color: var(--teal);
}

nav span {
    margin-left: 6px;
    color: var(--muted);
}

.header-note {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--teal);
    display: inline-block;
    border-radius: 50%;
    flex-shrink: 0;
}

.intro {
    text-align: center;
    padding: 57px 20px 35px;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 17px;
}

.eyebrow>span {
    width: 17px;
    height: 1px;
    background: var(--teal);
}

h1 {
    font-family: 'Manrope',sans-serif;
    font-size: clamp(32px,4vw,47px);
    font-weight: 750;
    letter-spacing: -2px;
    margin: 0 0 17px;
    line-height: 1.25;
}

h1 em {
    font-style: normal;
    color: var(--teal);
}

.intro>p:last-child {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.8;
    margin: 0;
}

.tuner {
    max-width: 850px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #dce5df;
    border-radius: 16px;
    box-shadow: 0 12px 35px #233d3010;
    overflow: hidden;
}

.tuner-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px;
    border-bottom: 1px solid var(--line);
    gap: 15px;
}

.tool-title {
    display: flex;
    align-items: center;
    gap: 9px;
}

.tool-title h2 {
    font-size: 13px;
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
}

.wave-icon {
    color: var(--teal);
    font-size: 13px;
    letter-spacing: 1px;
}

.live-badge {
    font-size: 9px;
    background: #f1f4f1;
    color: #75827b;
    border: 1px solid #e7ece7;
    border-radius: 20px;
    padding: 5px 9px;
    white-space: nowrap;
}

.is-listening .live-badge {
    color: var(--teal);
    background: #e7f4ee;
}

.tuning-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tuning-control label {
    font-size: 10px;
    color: var(--muted);
}

select {
    color: var(--ink);
    background-color: white;
    border: 1px solid #dbe3df;
    border-radius: 6px;
    padding: 9px 27px 9px 11px;
    font-size: 11px;
    max-width: 100%;
}

.tuning-control select {
    max-width: 228px;
}

.tuner-body {
    padding: 24px 30px 19px;
}

.pitch-display {
    background: linear-gradient(125deg,#f0f5ef,#f6f8f1);
    border: 1px solid #e3e9df;
    border-radius: 10px;
    padding: 18px 27px 17px;
    text-align: center;
}

.display-heading {
    display: flex;
    justify-content: space-between;
    color: #7c8980;
    font-size: 9px;
    letter-spacing: 1.3px;
}

.display-heading span:last-child {
    letter-spacing: .4px;
}

.note {
    font-family: 'Manrope',sans-serif;
    font-size: 78px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -3px;
    color: #506758;
    min-height: 98px;
    margin-top: 6px;
}

.frequency {
    font-size: 11px;
    color: #879286;
    font-variant-numeric: tabular-nums;
    letter-spacing: .5px;
}

.pitch-meter {
    height: 42px;
    position: relative;
    max-width: 560px;
    margin: 24px auto 0;
}

.meter-ticks {
    position: absolute;
    inset: 9px 0 8px;
    background: repeating-linear-gradient(90deg,#a9b8aa 0,#a9b8aa 1px,transparent 1px,transparent 2.5%);
    mask-image: linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent);
}

.in-tune-zone {
    position: absolute;
    left: 45.5%;
    width: 9%;
    height: 42px;
    background: #c7e3cf80;
    border-radius: 5px;
    top: 0;
}

.center-tick {
    position: absolute;
    width: 2px;
    height: 33px;
    background: #5c9a71;
    left: 50%;
    top: 5px;
}

.needle {
    position: absolute;
    left: 50%;
    top: 0;
    height: 42px;
    width: 3px;
    background: var(--teal);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left .12s ease-out;
}

.needle:before {
    content: '';
    position: absolute;
    top: -5px;
    left: -4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--teal);
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    max-width: 560px;
    margin: 10px auto 0;
    font-size: 8px;
    letter-spacing: 1px;
    color: #809081;
}

.meter-labels span:nth-child(2) {
    color: #63856d;
}

.pitch-offset {
    font-size: 11px;
    color: #7c887e;
    margin: 18px 0 0;
    min-height: 16px;
}

.in-tune .pitch-offset,.in-tune .note {
    color: #2d8551;
}

.strings-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 13px;
}

.strings-heading p {
    font-size: 11px;
    font-weight: 600;
    margin: 0;
}

.strings-heading p span {
    font-size: 10px;
    font-weight: 400;
    color: var(--muted);
    margin-left: 8px;
}

.auto-button {
    font-size: 10px;
    border: 1px solid #dde7e0;
    background: white;
    padding: 6px 9px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auto-button[aria-pressed=true] {
    background: #eaf4f0;
    border-color: #c9dfd5;
    color: var(--teal);
}

.strings {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 10px;
}

.string {
    position: relative;
    border: 1px solid #dfe6e1;
    border-radius: 8px;
    background: #fff;
    padding: 10px 5px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.string-number {
    font-size: 9px;
    color: #94a098;
    z-index: 1;
    background: inherit;
    padding: 0 6px;
}

.string-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--string-weight);
    background: #f0f3ef;
    left: 50%;
    transform: translateX(-50%);
}

.string-pitch {
    z-index: 1;
    margin: 9px 0 8px;
    background: inherit;
    line-height: 1.1;
    padding: 3px 5px;
}

.string-note {
    font-family: 'Manrope',sans-serif;
    font-size: 29px;
    font-weight: 600;
}

.string-octave {
    font-size: 11px;
    color: #929e96;
    margin-left: 2px;
}

.string-frequency {
    font-size: 9px;
    color: #939d97;
    z-index: 1;
    background: inherit;
    white-space: nowrap;
}

.string:hover,.string.selected {
    border-color: var(--teal);
    background: #f1f8f5;
}

.string.detected {
    border-color: var(--teal);
    box-shadow: 0 0 0 1px var(--teal);
    color: var(--teal);
}

.string-hint {
    text-align: center;
    font-size: 10px;
    color: #929b95;
    margin: 12px 0 22px;
}

.microphone-controls {
    display: flex;
    align-items: end;
    gap: 15px;

}

.input-control {
    flex: 1;
    min-width: 0;
}

.input-control label {
    display: block;
    font-size: 8px;
    color: var(--muted);
    letter-spacing: 1.1px;
    font-weight: 600;
    margin-bottom: 7px;
}

.input-control select {
    width: 100%;
    font-size: 11px;
    height: 40px;
    background-color: #fcfdfb;
}

.start-button {
    min-width: 205px;
    border: 1px solid #21737a;
    background: var(--teal);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 12px 20px;
    height: 40px;
    border-radius: 6px;
    box-shadow: 0 2px 2px #203f3610;
}

.start-button:hover {
    background: #186970;
}

.input-status {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 13px;
    min-height: 18px;
}

.input-status p {
    font-size: 10px;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

.signal-meter {
    width: 100%;
    height: 9px;
    display: block;
    background: #e6ebe5;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.signal-meter>span {
    height: 100%;
    width: 0;
    background: var(--teal);
    display: block;
    transition: width .1s;
}

.privacy-note {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    background: #f8faf7;
    border-top: 1px solid var(--line);
    padding: 14px 20px;
    font-size: 9px;
    line-height: 1.6;
    color: #829086;
}

.privacy-note svg {
    width: 13px;
    height: 15px;
    stroke: #80958a;
    fill: none;
    stroke-width: 1.5;
    flex-shrink: 0;
}

.how-it-works {
    max-width: 940px;
    margin: 53px auto 0;
    padding: 0 20px;
}

.section-heading {
    text-align: center;
}

.section-heading .eyebrow {
    font-size: 8px;
    margin-bottom: 11px;
    letter-spacing: 1.8px;
}

.section-heading h2 {
    font-family: 'Manrope',sans-serif;
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -.8px;
    margin: 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 32px;
    margin-top: 29px;
}

.steps article {
    display: flex;
    gap: 13px;
}

.step-number {
    font-size: 11px;
    color: var(--teal);
    background: #eaf1e9;
    width: 29px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e9de;
    border-radius: 8px;
    flex-shrink: 0;
}

.steps h3 {
    font-size: 12px;
    margin: 3px 0 8px;
    font-weight: 650;
}

.steps p {
    font-size: 11px;
    line-height: 1.8;
    color: var(--muted);
    margin: 0;
}

.tip {
    font-size: 10px;
    text-align: center;
    color: #819086;
    margin: 31px 0 40px;
}

.tip>span {
    color: var(--teal);
    font-size: 17px;
    vertical-align: middle;
    margin-right: 6px;
}

.tip strong {
    font-weight: 600;
}

footer {
    max-width: 1192px;
    margin: 0 auto;
    border-top: 1px solid var(--line);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    color: #8b958e;
    font-size: 9px;
}

footer>span:first-child {
    font-family: 'Manrope',sans-serif;
    font-weight: 750;
    font-size: 14px;
    color: #4c5c53;
}

footer p {
    margin: 0;
}

.teal {
    color: var(--teal);
}

.no-script {
    font-size: 12px;
    text-align: center;
    color: #9a5329;
}

@media(min-width:1500px) {
    .intro {
        padding-top: 72px;
    }
    .tuner {
        max-width: 900px;
    }
    .how-it-works {
        margin-top: 62px;
    }
}

@media(max-width:1000px) {
    .header-note {
        display: none;
    }
    .site-header {
        height: 96px;
        padding: 0 24px;
    }
    .brand {
        height: 90px;
    }
    .brand img {
        margin-top: -29px;
    }
    .tuner {
        margin-left: 24px;
        margin-right: 24px;
    }
    footer {
        margin: 0 24px;
    }
    .intro {
        padding-top: 40px;
    }
}

@media(max-width:650px) {
    .site-header {
        padding: 0 16px;
        gap: 12px;
        height: 88px;
    }
    .brand {
        width: 150px;
        height: 82px;
    }
    .brand img {
        width: 150px;
        height: 112px;
        margin-top: -14px;
    }
    .site-header nav {
        gap: 17px;
        font-size: 11px;
    }
    .site-header nav span {
        display: none;
    }
    .intro {
        padding: 32px 20px 27px;
    }
    h1 {
        font-size: 33px;
        letter-spacing: -1.4px;
        max-width: 370px;
        margin: 0 auto 14px;
    }
    .intro>p:last-child {
        font-size: 12px;
    }
    .desktop-break {
        display: none;
    }
    .eyebrow {
        font-size: 9px;
    }
    .tuner {
        margin: 0 14px;
        border-radius: 12px;
    }
    .tuner-toolbar {
        padding: 15px 17px;
        align-items: stretch;
        flex-direction: column;
        gap: 13px;
    }
    .tool-title {
        justify-content: flex-start;
    }
    .live-badge {
        margin-left: auto;
    }
    .tuning-control {
        justify-content: space-between;
    }
    .tuning-control select {
        max-width: 80%;
        flex: 1;
    }
    .tuner-body {
        padding: 16px;
    }
    .pitch-display {
        padding: 16px 15px;
    }
    .note {
        font-size: 70px;
        min-height: 88px;
    }
    .meter-labels {
        font-size: 7px;
        letter-spacing: .5px;
    }
    .strings {
        gap: 5px;
    }
    .string {
        padding: 8px 1px;
    }
    .string-note {
        font-size: 24px;
    }
    .string-octave {
        font-size: 8px;
        margin-left: 0;
    }
    .string-frequency {
        font-size: 7px;
    }
    .strings-heading p span {
        display: none;
    }
    .microphone-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .start-button {
        width: 100%;
    }
    .privacy-note {
        font-size: 8px;
        text-align: center;
        padding: 12px 16px;
    }
    .input-status p {
        font-size: 9px;
    }
    .string-hint {
        font-size: 9px;
    }
    .how-it-works {
        margin-top: 38px;
        padding: 0 27px;
    }
    .section-heading h2 {
        font-size: 22px;
    }
    .steps {
        grid-template-columns: 1fr;
        gap: 23px;
        margin-top: 26px;
    }
    .steps h3 {
        font-size: 13px;
    }
    .steps p {
        font-size: 12px;
    }
    .tip {
        line-height: 1.8;
        margin: 27px 0;
    }
    .tip strong {
        white-space: nowrap;
    }
    footer {
        margin: 0 20px;
        flex-wrap: wrap;
        padding: 20px 0;
    }
    footer p {
        order: 3;
        width: 100%;
        font-size: 10px;
    }
    footer>span:last-child {
        font-size: 8px;
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto;
    }
    *,*::before {
        transition: none!important;
    }
}

@keyframes tuning-success {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(1.035); }
}

@keyframes tuning-glow {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    45% { box-shadow: 0 0 0 4px #5c9a7126; }
}

.tuning-success .note {
    animation: tuning-success 650ms ease-in-out;
}

.tuning-success .string.detected {
    animation: tuning-glow 650ms ease-in-out;
    background: #edf7ee;
}

@media (prefers-reduced-motion: reduce) {
    .tuning-success .note, .tuning-success .string.detected {
        animation: none;
    }
}

.input-level-panel {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}
.level-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
    margin-bottom: 8px;
}
.level-heading > span:last-child {
    font-variant-numeric: tabular-nums;
}

.input-level-panel p {
    font-size: 11px;
    line-height: 1.5;
    color: var(--muted);
    margin: 8px 0 14px;
}
.input-level-panel p:last-child { margin-bottom: 0; }
