/* =============================================================
   MCK Software and Consulting — açık & profesyonel tema
   Aydınlık zemin, teal→camgöbeği marka aksanı; koyu yalnız
   Bulut bandı ve footer'da. İmza: monogramdan türeyen aperture.
   ============================================================= */

:root {
    /* Light grounds & surfaces (cool, teal-biased neutrals) */
    --ground: #f3f7f9;       /* page */
    --surface: #ffffff;      /* white sections / cards */
    --tint: #e7f1f4;         /* subtle teal-tinted feature panel */
    --cell: #ffffff;

    /* Text on light */
    --ink: #0d2731;          /* primary text — deep teal-navy, not black */
    --muted: #4e6b76;        /* secondary */
    --faint: #7793a0;        /* captions / rail */

    /* Brand */
    --accent: #0f6e8c;       /* deep ocean — AA on light, primary accent */
    --accent-2: #17a6a0;     /* teal */
    --cyan: #35a8c8;         /* brighter, used on dark grounds */
    --redline: #cf4a2c;      /* warm annotation, sparing */
    --grad: linear-gradient(100deg, #1c7fa6 0%, #17a6a0 46%, #54c6e6 100%);

    /* Lines */
    --hairline: #dce7eb;
    --hairline-strong: #c6d6dc;
    --graticule: rgba(15, 110, 140, 0.05);

    /* Dark contexts (cloud band + footer) */
    --dark: #0b2733;
    --dark-2: #0f2f3d;
    --abyss: #072028;
    --on-dark: #e7f1f5;
    --on-dark-mut: #8fabb8;
    --hairline-dark: rgba(255, 255, 255, 0.10);

    --ff-display: "Archivo", "Segoe UI", system-ui, sans-serif;
    --ff-body: "Archivo", system-ui, -apple-system, sans-serif;
    --ff-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

    --wrap: 1160px;
    --radius: 14px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: var(--ff-body);
    font-weight: 400;
    background: var(--ground);
    color: var(--ink);
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: var(--ff-display);
    font-weight: 700;
    font-stretch: 110%;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
    overflow-wrap: break-word;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---------- Mono building blocks ---------- */
.eyebrow {
    font-family: var(--ff-mono); font-size: 0.72rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent);
    margin: 0 0 20px; display: block;
}
.mono-label { font-family: var(--ff-mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 8vw, 112px) 0; position: relative; }
.section-light { background: var(--surface); }
.section-plain { background: var(--ground); }
.section-tint { background: var(--tint); }
.section-dark { background: var(--dark); color: var(--on-dark); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.section-sub { margin-top: 14px; font-family: var(--ff-mono); font-size: 0.84rem; letter-spacing: .02em; color: var(--muted); }
.section-body { margin-top: 18px; font-size: 1.05rem; color: var(--muted); max-width: 62ch; }

/* dark-context overrides */
.section-dark .eyebrow { color: var(--cyan); }
.section-dark .section-body, .section-dark .section-sub { color: var(--on-dark-mut); }

/* faint blueprint graticule only on hero + tinted feature */
.hero::before, .section-tint::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--graticule) 1px, transparent 1px),
        linear-gradient(90deg, var(--graticule) 1px, transparent 1px);
    background-size: 46px 46px; pointer-events: none; z-index: 0;
}
.hero > .wrap, .section-tint > .wrap { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 0.5em;
    font-family: var(--ff-body); font-weight: 600; font-size: 0.98rem;
    padding: 13px 24px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
    transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s;
    white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px -12px rgba(15, 110, 140, 0.7); }
.btn-primary:hover { background: #0c5c76; transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(15, 110, 140, 0.75); }
.btn-lg { padding: 16px 30px; font-size: 1.03rem; }
.btn-line { color: var(--ink); border-color: var(--hairline-strong); background: transparent; }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.btn .arr { transition: transform .2s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.section-dark .btn-line { color: var(--on-dark); border-color: var(--hairline-dark); }
.section-dark .btn-line:hover { border-color: var(--cyan); color: #fff; }
.btn-ghost { background: var(--accent); color: #fff; padding: 9px 18px; font-size: 0.9rem; }
.btn-ghost:hover { background: #0c5c76; }

/* ---------- Skip link ---------- */
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { left: 16px; }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 100; transition: background .3s, border-color .3s, box-shadow .3s; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--hairline); box-shadow: 0 6px 24px -20px rgba(13, 39, 49, .5); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 20px; }
.brand { display: flex; align-items: center; }
.brand img { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links > a:not(.btn) { font-size: 0.95rem; color: var(--muted); position: relative; transition: color .2s; }
.nav-links > a:not(.btn):hover { color: var(--ink); }
.nav-links > a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--grad); transition: width .25s var(--ease); }
.nav-links > a:not(.btn):hover::after { width: 100%; }

.lang-switch { font-family: var(--ff-mono); font-size: 0.75rem; letter-spacing: .05em; display: inline-flex; align-items: center; gap: 4px; color: var(--faint); border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 3px 8px; }
.lang-switch a { color: var(--faint); transition: color .2s; display: inline-flex; align-items: center; min-height: 24px; padding: 0 5px; }
.lang-switch a:hover, .lang-switch a[aria-current="page"] { color: var(--accent); }
.lang-switch .sep { opacity: .4; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Dimension rail (wide) + progress ---------- */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: var(--grad); z-index: 200; transition: width .1s linear; }
.dim-rail { display: none; }
@media (min-width: 1460px) {
    .dim-rail { display: flex; flex-direction: column; gap: 18px; position: fixed; top: 50%; left: 28px; transform: translateY(-50%); z-index: 90; }
    .dim-rail .station { display: flex; align-items: center; gap: 10px; font-family: var(--ff-mono); font-size: 0.62rem; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; transition: color .3s; }
    .dim-rail .tick { width: 18px; height: 1px; background: currentColor; transition: width .3s, background .3s; }
    .dim-rail .station.active { color: var(--accent); }
    .dim-rail .station.active .tick { width: 30px; background: var(--accent); }
    .dim-rail .station.passed { color: var(--redline); }
    body.on-dark-rail .dim-rail .station { color: var(--on-dark-mut); }
    body.on-dark-rail .dim-rail .station.active { color: var(--cyan); }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(52px, 8vw, 108px) 0 clamp(56px, 8vw, 116px); overflow: hidden; }
.hero-glow { position: absolute; inset: -25% -10% auto auto; width: 680px; height: 680px; background: radial-gradient(circle at 70% 30%, rgba(23, 166, 160, 0.16), transparent 62%); pointer-events: none; z-index: 0; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 44px; align-items: center; }
.hero-title { font-size: clamp(2.3rem, 5.6vw, 4.4rem); font-weight: 800; font-stretch: 116%; letter-spacing: -.03em; line-height: 1.05; }
.hero-sub { margin-top: 20px; font-family: var(--ff-mono); font-size: clamp(0.88rem, 1.3vw, 1rem); letter-spacing: .01em; color: var(--accent); }
.hero-lead { margin-top: 20px; font-size: clamp(1.05rem, 1.5vw, 1.18rem); color: var(--muted); max-width: 48ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Aperture — colors overridden here so the SVG reads on light */
.hero-visual { display: grid; place-items: center; position: relative; }
.aperture-wrap { position: relative; width: min(400px, 80vw); aspect-ratio: 1; }
.aperture { width: 100%; height: 100%; overflow: visible; }
.aperture .ap-ring { transform-box: fill-box; transform-origin: center; }
.aperture .ap-ring-1 { animation: ap-spin 46s linear infinite; }
.aperture .ap-ring-2 { animation: ap-spin 34s linear infinite reverse; }
.aperture .ap-ring-3 { animation: ap-spin 26s linear infinite; }
.aperture .ap-rings { transform-box: fill-box; transform-origin: center; animation: ap-breathe 9s ease-in-out infinite; }
.aperture .ap-reticle line { stroke: var(--accent-2); }
.aperture .ap-core { fill: var(--accent); animation: ap-pulse 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ap-spin { to { transform: rotate(360deg); } }
@keyframes ap-breathe { 0%,100% { transform: scale(1);} 50% { transform: scale(1.02);} }
@keyframes ap-pulse { 0%,100% { opacity: .82; transform: scale(1);} 50% { opacity: 1; transform: scale(1.16);} }

.readouts { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); display: grid; gap: 16px; }
.readout { display: flex; align-items: baseline; gap: 8px; }
.readout .r-val { font-family: var(--ff-mono); font-weight: 600; font-size: clamp(0.9rem, 1.1vw, 1.05rem); color: var(--ink); }
.readout .r-val::before { content: "Ø "; color: var(--accent-2); }
.readout .r-lab { font-family: var(--ff-mono); font-size: 0.62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

/* ---------- Title-block strip ---------- */
.titleblock { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: var(--surface); }
.titleblock .wrap { display: flex; flex-wrap: wrap; gap: 8px 36px; padding-block: 15px; }
.titleblock .tb-item { font-family: var(--ff-mono); font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.titleblock .tb-item::before { content: ""; width: 6px; height: 6px; background: var(--grad); border-radius: 1px; }

/* ---------- References (logo wall) ---------- */
.logo-wall { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.logo-wall li { background: var(--cell); display: grid; place-items: center; padding: 28px 20px; min-height: 112px; }
.logo-wall img { max-height: 44px; max-width: min(128px, 100%); width: auto; object-fit: contain; filter: grayscale(1); opacity: .62; transition: filter .5s var(--ease), opacity .5s var(--ease), transform .3s var(--ease); }
.js .logo-wall.reveal img { opacity: 0; }
.js .logo-wall.reveal.in img { opacity: .62; }
.logo-wall li:hover img { filter: grayscale(0); opacity: 1; transform: scale(1.05); }
/* logo wall sits on white sections; on tint/plain give cells a frame */
.section-plain .logo-wall, .section-tint .logo-wall { background: var(--hairline); }

/* ---------- Plates (services, sigorta, why) — white cards on light ---------- */
.plate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plate { position: relative; padding: 30px 28px 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--hairline); overflow: hidden; box-shadow: 0 1px 2px rgba(13,39,49,.03); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.plate::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.plate:hover { transform: translateY(-3px); border-color: var(--hairline-strong); box-shadow: 0 16px 34px -22px rgba(13,39,49,.4); }
.plate:hover::before { transform: scaleX(1); }
.plate .tag { font-family: var(--ff-mono); font-size: 0.7rem; letter-spacing: .08em; color: var(--accent); }
.plate h3 { font-size: 1.28rem; font-stretch: 100%; margin: 14px 0 12px; color: var(--ink); }
.plate p { color: var(--muted); font-size: 0.98rem; }
.plate p a { color: var(--accent); }

/* ---------- Sectors ---------- */
.sector-list { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.sector-row { background: var(--surface); padding: 22px 26px; display: grid; grid-template-columns: 220px 1fr auto; gap: 20px; align-items: center; position: relative; transition: background .25s; }
.sector-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); opacity: 0; transition: opacity .25s; }
.sector-row:hover { background: var(--tint); }
.sector-row:hover::before { opacity: 1; }
.sector-row h3 { font-size: 1.2rem; font-stretch: 104%; color: var(--ink); }
.sector-row p { color: var(--muted); font-size: 0.95rem; max-width: 60ch; }
.sector-row .clients { font-family: var(--ff-mono); font-size: 0.66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); text-align: right; white-space: nowrap; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 40px; padding-top: 36px; border-top: 1px solid var(--hairline); }
.stat .s-tag { font-family: var(--ff-mono); font-size: 0.64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 8px; }
.stat .s-num { font-family: var(--ff-display); font-weight: 800; font-stretch: 112%; font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1; color: var(--ink); letter-spacing: -.03em; }
.stat p { margin-top: 12px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Cloud (the one dark band) ---------- */
.cloud { background: radial-gradient(circle at 12% 15%, rgba(23,166,160,.18), transparent 46%), radial-gradient(circle at 88% 92%, rgba(84,198,230,.14), transparent 46%), var(--dark); color: var(--on-dark); }
.cloud .section-head h2 { color: var(--on-dark); }
.cloud-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cloud-card { padding: 34px 32px; border-radius: var(--radius); background: rgba(255,255,255,.045); border: 1px solid var(--hairline-dark); transition: transform .3s var(--ease), border-color .3s; }
.cloud-card:hover { transform: translateY(-3px); border-color: rgba(84,198,230,.4); }
.cloud-card .tag { font-family: var(--ff-mono); font-size: 0.7rem; letter-spacing: .1em; color: var(--cyan); }
.cloud-card h3 { font-size: 1.32rem; font-stretch: 100%; margin: 12px 0 12px; }
.cloud-card h3 .grad-text { display: inline; }
.cloud-card p { color: var(--on-dark-mut); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 52px; align-items: center; }
.contact h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
.contact .btn { margin-top: 28px; }
.contact-details { border-top: 1px solid var(--hairline); }
.contact-details li { padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.contact-details .mono-label { color: var(--faint); display: block; margin-bottom: 6px; }
.contact-details a, .contact-details span:not(.mono-label) { font-size: 1.06rem; color: var(--ink); }
.contact-details a { transition: color .2s; }
.contact-details a:hover { color: var(--accent); }

/* ---------- Footer (dark) ---------- */
.site-footer { background: var(--abyss); color: var(--on-dark); padding: 60px 0 32px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 30px; padding-bottom: 38px; }
.footer-logo { height: 30px; width: auto; margin-bottom: 16px; }
.footer-name { color: var(--on-dark-mut); font-size: 0.94rem; max-width: 34ch; }
.footer-meta { display: flex; flex-direction: column; gap: 8px; }
.footer-meta .fm { font-family: var(--ff-mono); font-size: 0.7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-mut); }
.footer-meta a.fm:hover { color: var(--cyan); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-nav a { color: var(--on-dark-mut); font-size: 0.94rem; transition: color .2s; }
.footer-nav a:hover { color: var(--on-dark); }
.footer-base { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 24px; border-top: 1px solid var(--hairline-dark); color: var(--on-dark-mut); font-size: 0.82rem; font-family: var(--ff-mono); letter-spacing: .04em; }
.footer-base a:hover { color: var(--cyan); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.section-dark :focus-visible, .cloud :focus-visible, .site-footer :focus-visible { outline-color: var(--cyan); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .aperture .ap-ring, .aperture .ap-rings, .aperture .ap-core { animation: none; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .js .logo-wall.reveal img { opacity: .62; }
    .btn, .plate, .cloud-card, .logo-wall img, .sector-row { transition: none; }
    .plate::before, .sector-row::before, .dim-rail .tick, .nav-links > a:not(.btn)::after { transition: none; }
    .progress-bar { transition: none; }
}

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 8px; }
    .hero-visual { order: -1; }
    .aperture-wrap { width: min(300px, 64vw); }
    .readouts { position: static; transform: none; display: flex; justify-content: center; gap: 26px; margin-top: 18px; }
    .plate-grid { grid-template-columns: repeat(2, 1fr); }
    .cloud-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; gap: 34px; }
    .sector-row { grid-template-columns: 1fr; gap: 6px; }
    .sector-row .clients { text-align: left; white-space: normal; }
    .logo-wall { grid-template-columns: repeat(4, minmax(0,1fr)); }
    h1, h2 { font-stretch: 100%; }
    .hero-title { font-stretch: 106%; }
}

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: flex-start;
        gap: 4px; padding: 16px 24px 24px; background: rgba(255,255,255,.98);
        backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--hairline); box-shadow: 0 12px 30px -24px rgba(13,39,49,.5);
        transform: translateY(-12px); opacity: 0; visibility: hidden; pointer-events: none;
        transition: opacity .25s, transform .25s, visibility .25s;
    }
    .nav-links.open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
    .nav-links > a:not(.btn) { padding: 10px 0; font-size: 1.05rem; }
    .lang-switch { margin-top: 8px; }
    .nav-cta { margin-top: 8px; }
}

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

@media (max-width: 460px) {
    .logo-wall { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .logo-wall li { padding: 20px 12px; min-height: 92px; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}
