/* ==========================================================================
   blueprint.css — Tasarım 2 (blueprint)
   base.css'teki --font ve --font-cond değişkenlerini kullanır.
   Kendi paleti buradadır; terminal paletine dokunmaz.
   ========================================================================== */

/* ---------- palette ---------- */
html {
    --paper: #e8edf0;
    --ink: #13222d;
    --line: #2c5a7a;
    --soft: #55697d;
    --accent: #1c4fd6;
    --accent-ink: #ffffff;
    --grid: rgba(44, 90, 122, .085);
    /* base.css uses --accent-color for focus rings and the skip link —
       point it at this design's accent so they match. */
    --accent-color: #1c4fd6;
    --border-color: #2c5a7a;
}
html[data-theme="dark"] {
    --paper: #0f2a44;
    --ink: #e6f0f7;
    --line: #7fb0d6;
    --soft: #9db7ca;
    --accent: #ffd24a;
    --accent-ink: #0f2a44;
    --grid: rgba(127, 176, 214, .10);
    --accent-color: #ffd24a;
    --border-color: #7fb0d6;
}

/* ---------- page ---------- */
body {
    background: var(--paper);
    color: var(--ink);
    font: 400 1.0625rem/1.65 var(--font);
    -webkit-font-smoothing: antialiased;
    padding:
        env(safe-area-inset-top, 0)
        env(safe-area-inset-right, 0)
        env(safe-area-inset-bottom, 0)
        env(safe-area-inset-left, 0);
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent); }

/* ---------- sheet + frame ---------- */
.sheet {
    max-width: 68rem;
    margin: clamp(.75rem, 3vw, 2.5rem) auto;
    padding: 0 clamp(.75rem, 3vw, 2.5rem);
}
.frame {
    position: relative;
    border: 2px solid var(--line);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 26px 26px;
    overflow: visible;
}

/* ---------- registrasyon işaretleri + kenar koordinatları ---------- */
.regmarks { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.regmarks span {
    position: absolute; width: 13px; height: 13px; opacity: .45;
    background:
        linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat,
        linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
}
.regmarks span:nth-child(1) { top: 5px; left: 5px; }
.regmarks span:nth-child(2) { top: 5px; right: 5px; }
.regmarks span:nth-child(3) { bottom: 5px; left: 5px; }
.regmarks span:nth-child(4) { bottom: 5px; right: 5px; }

/* üst koordinat şeridi (akışta; yapışkan toolbar altında kalmaz) */
.coords-x {
    display: flex; justify-content: space-between; align-items: center;
    padding: .22rem .9rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    font: 500 .6rem/1 var(--font-cond);
    color: var(--soft);
    opacity: .65;
    letter-spacing: .1em;
}
/* sol koordinat harfleri (mutlak; içerik alanına yayılır) */
.coords-y {
    position: absolute; top: 3.2rem; bottom: 1rem; left: 4px;
    display: flex; flex-direction: column; justify-content: space-between; align-items: center;
    pointer-events: none; z-index: 1;
    font: 500 .6rem/1 var(--font-cond);
    color: var(--soft);
    opacity: .5;
    letter-spacing: .1em;
}

/* ---------- toolbar ---------- */
.bar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    padding: .5rem .9rem;
    font: 500 .875rem/1.2 var(--font-cond);
    color: var(--soft);
    background: var(--paper);
}
.bar .who { font-weight: 600; color: var(--ink); letter-spacing: .02em; }
.bar .meta { white-space: nowrap; }
.bar .controls { display: flex; gap: .4rem; margin-left: auto; flex-wrap: wrap; }
.bar button, .bar .switch {
    font: 500 .875rem/1 var(--font-cond);
    color: var(--ink);
    background: none;
    border: 1px solid var(--line);
    padding: .5rem .75rem;
    min-height: 2.75rem;
    min-width: 2.75rem;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none;
    border-radius: 2px;
}
.bar button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.bar .switch { border-style: dashed; color: var(--accent); border-color: var(--accent); }
.bar .switch:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- hero + title block ---------- */
.hero {
    display: grid;
    grid-template-columns: 1fr 17rem;
    border-bottom: 1px solid var(--line);
}
.hero-main {
    padding: clamp(1.6rem, 5vw, 3.2rem) clamp(1rem, 3vw, 2rem);
    display: flex; flex-direction: column; justify-content: center;
    gap: .5rem; min-width: 0;
}
.hero h1 {
    margin: 0;
    padding: 0;
    font: 600 clamp(2.2rem, 6.6vw, 4.6rem)/1.02 var(--font);
    letter-spacing: -.035em;
    overflow-wrap: break-word;
}
.hero-note {
    margin: 0;
    font: 500 clamp(.66rem, 1.25vw, .78rem)/1 var(--font-cond);
    letter-spacing: .16em;
    color: var(--soft);
    opacity: .8;
}
.tagline {
    margin: 0;
    font: 500 clamp(.92rem, 1.9vw, 1.15rem)/1.4 var(--font);
    color: var(--accent);
    letter-spacing: -.005em;
    overflow-wrap: break-word;
}
.tb { margin: 0; border-left: 1px solid var(--line); display: grid; grid-template-rows: repeat(2, 1fr); }
.tb > div {
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--line);
    display: flex; flex-direction: column; justify-content: center;
    min-width: 0;
}
.tb > div:last-child { border-bottom: 0; }
.tb dt { font: 500 .82rem/1 var(--font-cond); color: var(--soft); margin-bottom: .35rem; letter-spacing: .02em; }
.tb dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- dimension line ---------- */
.dim {
    padding: 1.6rem clamp(1rem, 3vw, 2rem) 1.2rem;
    border-bottom: 1px solid var(--line);
}
.dim svg { display: block; width: 100%; height: auto; overflow: visible; }
.dim .ln { stroke: var(--line); stroke-width: 1.5; fill: none; }
.dim .ac {
    stroke: var(--accent); stroke-width: 3; fill: none;
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: sheet-draw 1.6s .2s ease-out forwards;
}
.dim text { fill: var(--ink); font: 500 14px var(--font-cond); }
.dim .m { fill: var(--soft); }
@keyframes sheet-draw { to { stroke-dashoffset: 0; } }

/* ---------- ölçek çubuğu ---------- */
.scalebar {
    display: flex; align-items: flex-end; gap: .6rem;
    margin-top: .9rem;
    font: 500 .7rem/1 var(--font-cond);
    color: var(--soft);
    letter-spacing: .04em;
}
.scalebar .sb-label { white-space: nowrap; }
.scalebar .sb-track {
    display: flex; height: 7px; width: 8.25rem;
    border: 1px solid var(--line);
}
.scalebar .sb-track i { flex: 1 1 0; }
.scalebar .sb-track i:nth-child(odd) { background: var(--line); }
.scalebar .sb-ticks { display: flex; width: 8.25rem; justify-content: space-between; }

/* ---------- section headings ---------- */
h2 {
    margin: 0;
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--line);
    font: 500 .95rem/1.3 var(--font-cond);
    color: var(--soft);
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    letter-spacing: .04em;
}
h2 .idx { font-variant-numeric: tabular-nums; opacity: .7; }
.h2-main { display: inline-flex; align-items: baseline; gap: .7rem; min-width: 0; flex-wrap: wrap; }
h2 .sub {
    color: var(--accent);
    font-size: .78rem;
    letter-spacing: .14em;
}

/* ---------- manifesto ---------- */
.notes {
    padding: 1.2rem clamp(1rem, 3vw, 2rem);
    border-bottom: 1px solid var(--line);
}
.prose {
    max-width: none;
    margin: 0;
}
.prose p { margin: 0 0 1.15em; text-wrap: pretty; overflow-wrap: break-word; }
.prose p:last-child { margin-bottom: 0; }
.prose em { font-style: italic; }
.prose a { color: var(--accent); text-decoration: underline; padding: 4px 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
@media (min-width: 900px) { .prose p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; } }

/* ---------- contact ---------- */
.links { display: grid; grid-template-columns: repeat(3, 1fr); }
.links a {
    padding: 1.05rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    font-weight: 600;
    min-height: 3.75rem;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.links a:nth-child(3n) { border-right: 0; }
.links a:nth-last-child(-n+3) { border-bottom: 0; }
.links a span {
    font: 500 .8rem/1.2 var(--font-cond);
    color: var(--soft);
    text-align: right;
    overflow-wrap: anywhere;
}
.links a:hover { background: var(--accent); color: var(--accent-ink); }
.links a:hover span { color: inherit; }

/* ---------- footer ---------- */
.sheet-footer {
    padding: .8rem 1rem;
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    border-top: 1px solid var(--line);
    font: 500 .8rem/1.45 var(--font-cond);
    color: var(--soft);
}
.sheet-footer a { color: var(--accent); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; }
    .tb {
        border-left: 0;
        border-top: 1px solid var(--line);
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .tb > div:nth-child(odd) { border-right: 1px solid var(--line); }
    .tb > div { border-bottom: 0; }
    .links { grid-template-columns: 1fr 1fr; }
    .links a:nth-child(3n) { border-right: 1px solid var(--line); }
    .links a:nth-child(2n) { border-right: 0; }
    .links a:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
    .links a:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 480px) {
    .bar .meta { display: none; }
}
@media (max-width: 420px) {
    .links { grid-template-columns: 1fr; }
    .links a { border-right: 0; min-height: 3rem; }
    .links a:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
    .links a:last-child { border-bottom: 0; }
    .sheet { padding: 0; margin: clamp(.5rem, 3vw, 1rem) auto; }
    .frame { border-left: 0; border-right: 0; }
    .bar { padding: .5rem .6rem; gap: .5rem; }
    .bar .controls { width: 100%; margin-left: 0; }
    .bar button, .bar .switch { flex: 1 1 auto; min-height: 44px; }
    .tb { grid-template-columns: 1fr; }
    .tb > div:nth-child(odd) { border-right: 0; }
    .tb > div { border-bottom: 1px solid var(--line); }
    .tb > div:last-child { border-bottom: 0; }
    .notes { padding: 1rem .7rem; }
}
@media (max-height: 560px) and (orientation: landscape) {
    .hero-main { padding-top: clamp(1rem, 3vw, 1.6rem); padding-bottom: clamp(1rem, 3vw, 1.6rem); }
}

/* dimension çizgisi: dar ekranda üst etiketleri gizle (yıllar kalır) */
@media (max-width: 620px) {
    .dim .m { display: none; }
}

/* ==========================================================================
   Print — blueprint sheet (theme- and control-independent, black & white)
   ========================================================================== */
@media print {
    html, html[data-theme="dark"] {
        --paper: #ffffff;
        --ink: #000000;
        --line: #000000;
        --soft: #444444;
        --accent: #000000;
        --accent-ink: #ffffff;
        --grid: rgba(0, 0, 0, .14);
    }
    body { background: #fff; color: #000; }
    .skip-link,
    .bar .controls,
    .coords-x,
    .coords-y,
    .regmarks { display: none !important; }
    .bar { position: static; }
    .sheet { max-width: none; margin: 0; padding: 0; }
    .frame { border-color: #000; box-shadow: none; }
    a { color: #000; text-decoration: none; }
    .prose a { text-decoration: underline; }
    .links a span { color: #444; }
    .links a:hover, .prose a:hover { background: none; color: #000; }
    h1, h2, .headline { break-after: avoid; }
    .links a, .tb > div { break-inside: avoid; }
    .dim .ac { animation: none; stroke-dashoffset: 0; }
}
