/*
Theme Name: BRN Solutions
Author: BRN Solutions OÜ
Description: BRN Solutions OÜ ühelehe teema.
Version: 3.0.1
Requires PHP: 8.0
Text Domain: brn-solutions
*/

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --soft: #efece6;
  --ink: #0e0e10;
  --ink-2: #2b2b30;
  --muted: #626168;
  --line: rgba(14, 14, 16, 0.12);
  --line-2: rgba(14, 14, 16, 0.2);
  --red: #7a0e0e;
  --red-2: #9b1616;
  --red-deep: #3d0606;
  --red-soft: #f4e4e2;
  --grad: linear-gradient(160deg, #a51a1a 0%, #7a0e0e 45%, #4a0707 100%);
  --wrap: min(1200px, calc(100% - 48px));
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: "Archivo", "Inter", system-ui, sans-serif;
  --cut: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.wrap { width: var(--wrap); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; }

h1, h2, h3 { margin: 0; font-family: var(--head); font-stretch: 118%; font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; }
.red { color: var(--red); }
.sq { display: inline-block; width: .32em; height: .32em; background: var(--red); vertical-align: baseline; margin-left: .06em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 246, 243, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.brand span { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line-2); line-height: 1.2; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--red); transition: right .25s; }
.nav a:not(.btn):hover::after { right: 0; }
.nav .btn { color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; margin: 4px auto; transition: transform .25s, opacity .25s; }

/* Buttons (angled corner echoes the logo) */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 15px 26px; font-family: var(--sans); font-size: 15px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); transition: background .2s, transform .2s; }
.btn svg { width: 16px; height: 16px; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--red); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); clip-path: none; }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: var(--red-soft); }

/* Hero */
.hero { padding: 90px 0 110px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 40px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 30px; }
.tag::before { content: ""; width: 10px; height: 10px; background: var(--red); }
.hero h1 { font-size: clamp(38px, 5.4vw, 80px); margin-bottom: 30px; font-stretch: 112%; }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 560px; margin: 0 0 40px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.facts { display: flex; gap: 0; margin-top: 56px; border-top: 1px solid var(--line); max-width: 600px; }
.facts div { flex: 1; padding: 18px 18px 0 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.facts div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.facts b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }

.mark { position: relative; aspect-ratio: 1; max-width: 460px; margin-left: auto; width: 100%; }
.mark svg.r { width: 100%; height: 100%; filter: drop-shadow(0 30px 40px rgba(122, 14, 14, .22)); }
.pin { position: absolute; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); padding: 10px 14px; font-size: 13.5px; font-weight: 600; box-shadow: 0 16px 30px -18px rgba(14,14,16,.35); white-space: nowrap; }
.pin i { width: 8px; height: 8px; background: var(--red); flex: none; }
.pin-1 { left: -8%; top: 6%; }
.pin-2 { right: -4%; top: 46%; }
.pin-3 { left: 4%; bottom: 2%; }
.pin { animation: drift 8s ease-in-out infinite; }
.pin-2 { animation-delay: -2.6s; }
.pin-3 { animation-delay: -5.2s; }
@keyframes drift { 50% { transform: translateY(-8px); } }

/* Marquee strip */
.strip { background: var(--ink); color: #fff; overflow: hidden; padding: 20px 0; transform: rotate(-1.2deg); margin: 0 -20px; }
.strip-track { display: flex; width: max-content; animation: slide 38s linear infinite; }
.strip ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.strip li { font-family: var(--head); font-stretch: 118%; font-weight: 700; font-size: 20px; letter-spacing: -.01em; display: flex; align-items: center; gap: 28px; padding-right: 28px; white-space: nowrap; }
.strip li::after { content: ""; width: 9px; height: 9px; background: #c42424; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: 130px 0; }
.head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 64px; }
.head p { color: var(--muted); font-size: 18px; margin: 0; max-width: 480px; justify-self: end; }
.section h2 { font-size: clamp(36px, 5vw, 64px); }

/* Services: editorial rows */
.services { border-top: 1.5px solid var(--ink); }
.svc { display: grid; grid-template-columns: 90px 1.1fr 1.3fr 1fr; gap: 30px; padding: 40px 0; border-bottom: 1px solid var(--line-2); align-items: start; position: relative; transition: background .3s; }
.svc::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--red); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.svc:hover::before { width: 100%; }
.svc .num { font-family: var(--head); font-stretch: 118%; font-weight: 700; font-size: 15px; color: var(--red); padding-top: 6px; }
.svc h3 { font-size: clamp(24px, 2.4vw, 32px); }
.svc p { margin: 0; color: var(--muted); }
.svc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.svc li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.svc li::before { content: ""; width: 7px; height: 7px; background: var(--red); flex: none; transform: translateY(-2px); }

/* Automation band */
.band { background: var(--grad); color: #fff; position: relative; overflow: hidden; clip-path: polygon(0 0, 100% 40px, 100% 100%, 0 calc(100% - 40px)); padding: 170px 0; }
.band::before { content: ""; position: absolute; right: -6%; top: 50%; transform: translateY(-50%); width: 46%; aspect-ratio: 1; background: url("assets/brn-r.png") center / contain no-repeat; filter: brightness(0) invert(1); opacity: .05; }
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; position: relative; }
.band .tag { color: #f2c9c5; }
.band .tag::before { background: #fff; }
.band h2 { color: #fff; }
.band p { color: #f0d6d3; font-size: 18px; margin: 26px 0 0; }
.band p a { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.band p a:hover { text-decoration-color: #ff9f9f; }
.flows { display: grid; gap: 12px; }
.flow { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; gap: 12px; padding: 18px 20px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); }
.flow span { font-size: 15px; line-height: 1.4; }
.flow span:first-child { color: #f0cfcb; text-decoration: line-through; text-decoration-color: rgba(255,255,255,.35); }
.flow span:last-child { font-weight: 600; }
.flow svg { width: 22px; height: 22px; color: #fff; justify-self: center; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1.5px; background: var(--line-2); }
.step { padding-right: 30px; position: relative; }
.step .dot { width: 48px; height: 48px; display: grid; place-items: center; background: var(--bg); border: 1.5px solid var(--ink); font-family: var(--head); font-stretch: 118%; font-weight: 800; font-size: 15px; margin-bottom: 28px; position: relative; transition: background .3s, color .3s, border-color .3s; }
.step:hover .dot { background: var(--red); border-color: var(--red); color: #fff; }
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Values */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); margin-top: 80px; }
.value { background: var(--surface); padding: 30px 26px; }
.value b { display: block; font-family: var(--head); font-stretch: 118%; font-size: 18px; letter-spacing: -.01em; margin-bottom: 6px; }
.value span { color: var(--muted); font-size: 15px; }

/* Contact */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: 0; background: var(--surface); border: 1px solid var(--line); }
.contact-side { background: var(--ink); color: #fff; padding: 56px 48px; position: relative; overflow: hidden; }
.contact-side::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; background: url("assets/brn-r.png") center / contain no-repeat; opacity: .5; }
.contact-side h2 { color: #fff; font-size: clamp(32px, 3.6vw, 48px); }
.contact-side p { color: #b9b8c0; margin: 22px 0 36px; font-size: 17px; }
.contact-side a.mail { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 600; font-size: 18px; border-bottom: 1.5px solid var(--red-2); padding-bottom: 4px; }
.contact-side a.mail:hover { border-color: #fff; }
.contact-side a.mail svg { width: 20px; height: 20px; }
.contact-form { padding: 48px; }

/* CF7 */
.wpcf7 form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wpcf7 .full { grid-column: 1 / -1; }
.wpcf7 .lbl { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.wpcf7 label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.wpcf7 .wpcf7-form-control-wrap { display: block; margin-top: 7px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); padding: 13px 15px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 0; transition: border-color .2s, background .2s, box-shadow .2s; }
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: none; border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(122,14,14,.12); }
.wpcf7 textarea { height: 150px; resize: vertical; }
.wpcf7 .wpcf7-checkbox { display: flex; flex-wrap: wrap; gap: 8px; }
.wpcf7 .wpcf7-list-item { margin: 0; }
.wpcf7 .wpcf7-list-item label { font-weight: 500; cursor: pointer; }
.wpcf7 .wpcf7-list-item input { position: absolute; opacity: 0; pointer-events: none; }
.wpcf7 .wpcf7-list-item-label { display: inline-block; padding: 8px 14px; border: 1px solid var(--line-2); background: var(--bg); font-size: 14px; transition: all .2s; }
.wpcf7 .wpcf7-list-item input:checked + .wpcf7-list-item-label { background: var(--ink); color: #fff; border-color: var(--ink); }
.wpcf7 .wpcf7-list-item input:focus-visible + .wpcf7-list-item-label { box-shadow: 0 0 0 3px rgba(122,14,14,.3); }
.wpcf7 .form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wpcf7 .form-foot small { color: var(--muted); font-size: 13px; }
.wpcf7 input[type="submit"] { font: inherit; font-weight: 600; font-size: 15px; padding: 15px 28px; border: 0; cursor: pointer; background: var(--red); color: #fff; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); transition: background .2s; }
.wpcf7 input[type="submit"]:hover { background: var(--ink); }
.wpcf7 .wpcf7-spinner { margin: 0 0 0 10px; }
.wpcf7 .wpcf7-not-valid-tip { font-size: 13px; color: var(--red-2); margin-top: 5px; font-weight: 500; }
html .wpcf7 form .wpcf7-response-output { grid-column: 1 / -1; margin: 0; padding: 14px 16px; border: 0; font-size: 15px; font-weight: 500; }
.wpcf7 form.sent .wpcf7-response-output { background: #e3f3e8; color: #135c2f; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output { background: var(--red-soft); color: var(--red); }

/* Footer */
.site-footer { padding: 60px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-inner img { height: 22px; width: auto; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--red); }

/* Generic */
.content { padding: 80px 0 120px; max-width: 760px; }
.content h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 24px; }
.content a { color: var(--red); }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s !important; }
.d2 { transition-delay: .16s !important; }
.d3 { transition-delay: .24s !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .strip-track, .pin { animation: none; }
}

@media (max-width: 1020px) {
  .hero-grid, .band-grid, .contact { grid-template-columns: 1fr; }
  .mark { max-width: 360px; margin: 30px auto 0; }
  .head { grid-template-columns: 1fr; }
  .head p { justify-self: start; }
  .svc { grid-template-columns: 60px 1fr; }
  .svc p, .svc ul { grid-column: 2; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .steps::before { display: none; }
  .values { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .brand span { display: none; }
  .nav-toggle { display: block; }
  .nav { position: fixed; top: 78px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 22px; background: var(--bg); border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .25s, transform .25s; }
  .nav a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 16px; justify-content: center; }
  .nav-open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .hero { padding: 50px 0 80px; }
  .facts { flex-direction: column; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
  .facts div { padding-top: 14px; }
  .pin-1 { left: 0; } .pin-2 { right: 0; }
  .section { padding: 90px 0; }
  .svc { grid-template-columns: 1fr; gap: 14px; padding: 30px 0; }
  .svc p, .svc ul { grid-column: 1; }
  .band { padding: 120px 0; clip-path: polygon(0 0, 100% 20px, 100% 100%, 0 calc(100% - 20px)); }
  .flow { grid-template-columns: 1fr; gap: 6px; }
  .flow svg { justify-self: start; transform: rotate(90deg); }
  .steps, .values { grid-template-columns: 1fr; }
  .contact-side, .contact-form { padding: 34px 22px; }
  .wpcf7 form { grid-template-columns: 1fr; }
}
