/* almdanismanlik.com revision layer (on top of the taste-skill system):
   1. sections size to their content instead of one screen each (tighter rhythm),
   2. the logo's heartbeat line as the site's moving motif, counters, reveals, the process diagram,
   3. the Google map frame, 4. Lenis smooth scroll.
   Every motion here stops under prefers-reduced-motion. */

:root { --rv-pad: clamp(64px, 6.5vw, 104px); --rv-gap: clamp(32px, 3.4vw, 48px); --pulse: var(--p-accent); --text-2: #2f3b52; --accent-text: #b51c23; }

/* hyphenated codes such as TRH-2010 stay on one line (the fonts have no U+2011 no-break hyphen) */
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- 1. rhythm */
main > :is(section, .section):not(.hero), footer.closing {
  height: auto !important; min-height: 0 !important;
  padding-top: var(--rv-pad) !important; padding-bottom: var(--rv-pad) !important;
}
footer.closing > .wrap { grid-template-rows: auto auto !important; row-gap: var(--s-9); }
main > :is(section, .section) .section-head { margin-bottom: var(--rv-gap); }
main > :is(section, .section) .section-head > p { max-width: 64ch; }
.section-head .lede { margin-top: var(--s-4); font-size: var(--t-lead); line-height: 1.6; color: var(--text-2); max-width: 70ch; }

/* ---------------------------------------------------------------- the heartbeat motif */
/* small pulse mark before a section's eyebrow; draws itself once when it comes into view */
.pulse-mark { display: inline-block; width: 44px; height: 16px; margin-right: 10px; vertical-align: -2px; }
.pulse-mark path { fill: none; stroke: var(--pulse); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 1.1s cubic-bezier(.22,1,.36,1); }
.is-in .pulse-mark path, .pulse-mark.is-in path { stroke-dashoffset: 0; }
.eyebrow { display: flex; align-items: center; font: 500 var(--t-label)/1 var(--font-text); color: var(--muted); margin-bottom: var(--s-4); }

/* the hero's monitor line: the logo's beat running along the foot of the first screen */
.hero-ecg { position: absolute; left: 0; right: 0; bottom: 4px; height: 44px; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-ecg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-ecg .ecg-base { fill: none; stroke: rgb(255 255 255 / .16); stroke-width: 1.5; }
.hero-ecg .ecg-run { fill: none; stroke: var(--pulse); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 260 1740; stroke-dashoffset: 260; animation: ecg-run 4.6s linear 1 both; filter: drop-shadow(0 0 6px rgb(215 33 42 / .55)); }
@keyframes ecg-run { to { stroke-dashoffset: -1740; } }
@media (max-width: 1023px) { .hero-ecg { display: none; } }

/* ---------------------------------------------------------------- figures */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
.figure { padding-top: var(--s-5); border-top: 1px solid var(--line); }
.figure__n { display: block; font: var(--display-weight) clamp(28px, 3.4vw, 48px)/1 var(--font-display); letter-spacing: var(--display-tracking-xl); color: var(--ink); font-variant-numeric: tabular-nums; }
.figure__n sup { font-size: .42em; color: var(--accent); margin-left: 2px; vertical-align: .9em; }
.figure__l { display: block; margin-top: var(--s-3); font-size: var(--t-body); line-height: 1.5; color: var(--text-2); max-width: 26ch; }
@media (max-width: 1023px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-7); } }

/* ---------------------------------------------------------------- service cards */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.svc { position: relative; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-6); border-radius: var(--r-lg);
  background: var(--p-bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s, border-color .35s; }
.svc:hover, .svc:focus-visible { transform: translateY(-3px); border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); box-shadow: 0 14px 34px -22px rgb(14 27 51 / .45); }
.svc__icon { width: 40px; height: 40px; border-radius: 10px; background: color-mix(in oklab, var(--accent) 10%, transparent); display: grid; place-items: center; }
.svc__icon i { width: 22px; height: 22px; background: var(--accent); -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.svc h3 { margin: 0; font: 500 var(--t-card)/1.35 var(--font-text); }
.svc p { margin: 0; font-size: var(--t-body); line-height: 1.65; color: var(--text-2); }
.svc__more { margin-top: auto; padding-top: var(--s-3); font: 500 var(--t-small)/1 var(--font-text); color: var(--accent-text); display: inline-flex; align-items: center; gap: 6px; }
.svc__more::after { content: ""; width: 14px; height: 1.5px; background: currentColor; transition: width .3s; }
.svc:hover .svc__more::after { width: 22px; }
@media (max-width: 1023px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .svc-grid { grid-template-columns: 1fr; } .svc { padding: var(--s-5); } }

/* the three disciplines: taller copy under each photograph */
#uzmanlik .card p { color: var(--text-2); }

/* ---------------------------------------------------------------- process */
.process { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); row-gap: var(--s-7); align-items: center; }
.process > .steps { grid-column: 1 / span 5; }
.process > .process__visual { grid-column: 6 / -1; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: var(--s-5); }
.steps li { counter-increment: st; display: grid; grid-template-columns: 40px 1fr; column-gap: var(--s-4); }
.steps li::before { content: counter(st, decimal-leading-zero); font: 500 var(--t-small)/40px var(--font-text); color: var(--accent);
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); text-align: center; grid-row: span 2; }
.steps h3 { margin: 6px 0 4px; font: 500 var(--t-card)/1.35 var(--font-text); }
.steps p { margin: 0; color: var(--text-2); line-height: 1.65; }
.process__visual { border-radius: var(--r-lg); background: var(--p-bg); border: 1px solid var(--line); padding: var(--s-5); min-height: 420px; display: grid; }
.process__visual .dg { min-height: 380px; }
@media (max-width: 1023px) { .process > .steps, .process > .process__visual { grid-column: 1 / -1; } .process__visual { min-height: 0; } }

/* ---------------------------------------------------------------- about */
.about-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7); margin-top: var(--s-8); }
.about-body p { margin: 0; font-size: var(--t-body); line-height: 1.75; color: var(--ink); }
@media (max-width: 1023px) { .about-body { grid-template-columns: 1fr; gap: var(--s-5); } }

/* ---------------------------------------------------------------- home FAQ */
.faq-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); row-gap: var(--s-6); }
.faq-split > :first-child { grid-column: 1 / span 4; }
.faq-split { align-items: start; }
.faq-split > .faq { grid-column: 6 / -1; margin-top: 0 !important; }
.faq-split > .section-head { margin-bottom: 0; }
.faq-split .faq__item h3 { font: 500 var(--t-card)/1.4 var(--font-text); margin: 0 0 var(--s-3); }
.faq-split .faq__item p { margin: 0; line-height: 1.7; color: var(--text-2); }
@media (max-width: 1023px) { .faq-split > :first-child, .faq-split > .faq { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- contact + Google map */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); row-gap: var(--s-5); align-items: stretch; }
.contact > .office { grid-column: 1 / span 5; }
.contact > .map-frame { grid-column: 6 / -1; }
.office { display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-7); border-radius: var(--r-lg); background: var(--p-surface); border: 1px solid var(--line); }
.office address { font: 400 18px/1.6 var(--font-text); font-style: normal; color: var(--ink); }
.office dl { margin: 0; display: grid; gap: 0; }
.office dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px var(--s-4); padding: 12px 0; border-top: 1px solid var(--line); }
.office dd { min-width: 0; overflow-wrap: anywhere; }
.office dt { color: var(--muted); }
.office dd { margin: 0; font-weight: 500; }
.office .btn-row { margin-top: auto; }
.map-frame { position: relative; min-height: 460px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--p-surface); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  /* the brand's calm: muted streets, the pin keeps a little of its red */
  filter: grayscale(.72) contrast(1.04) brightness(1.03) saturate(.9); transition: filter .5s; }
.map-frame:hover iframe { filter: grayscale(.25) contrast(1.02); }
@media (max-width: 1023px) { .contact > .office, .contact > .map-frame { grid-column: 1 / -1; } .map-frame { min-height: 380px; } .office { padding: var(--s-6); } }

/* ---------------------------------------------------------------- the close: shield and beat */
.close-mark { position: absolute; right: calc((100% - min(100% - 2 * var(--gut), 1280px)) / 2); top: var(--rv-pad); width: clamp(140px, 18vw, 240px); opacity: .9; pointer-events: none; }
.close-mark .sh { fill: none; stroke: rgb(255 255 255 / .14); stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 340; stroke-dashoffset: 340; transition: stroke-dashoffset 1.8s cubic-bezier(.22,1,.36,1); }
.close-mark .bt { fill: none; stroke: var(--pulse); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.2s .6s cubic-bezier(.22,1,.36,1); }
.close-mark.is-in .sh, .close-mark.is-in .bt { stroke-dashoffset: 0; }
footer.closing { position: relative; overflow: hidden; }
@media (max-width: 639px) { .close-mark { display: none; } }

/* ---------------------------------------------------------------- reveal */
.js-site .rv { transform: translateY(22px); transition: transform .9s cubic-bezier(.22,1,.36,1); transition-delay: calc(var(--i, 0) * 90ms); }
.js-site .rv.is-in { transform: none; }

/* ---------------------------------------------------------------- 4. Lenis (its own rules, with iframes kept usable at rest) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-scrolling iframe { pointer-events: none; }
html:not(.lenis) { scroll-behavior: smooth; }
html { scroll-padding-top: calc(var(--nav) + 16px); }

@media (prefers-reduced-motion: reduce) {
  html:not(.lenis) { scroll-behavior: auto; }
  .hero-ecg .ecg-run { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; opacity: .5; }
  .pulse-mark path, .close-mark .sh, .close-mark .bt { transition: none; stroke-dashoffset: 0; }
  .js-site .rv { transform: none; transition: none; }
  .svc { transition: none; }
}
