/* Nelvarx Systems AB · v0.3
   Local assets only. Text and controls are real HTML, not part of the images. */
:root {
  --night: #09141d;
  --night-deep: #071018;
  --light: #f4f6f8;
  --light-alt: #eaf0f4;
  --ink: #132635;
  --body-ink: #485b6a;
  --white: #f5f9fc;
  --muted: #c0ced8;
  --accent: #bbdeee;
  --link: #24516e;
  --rule: #cbd5dd;
  --rule-dark: #354958;
  --max-width: 1312px;
  --gutter: clamp(22px, 4.3vw, 72px);
  --header-height: 94px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }
body { margin: 0; color: var(--white); background: var(--night); font: 400 16px/1.65 Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
p, h1, h2, h3, ol { margin: 0; }
h1, h2, h3 { font-weight: 400; line-height: 1.14; text-wrap: balance; }
a, button { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent); color: var(--night); }
:focus-visible { outline: 3px solid #95d6fc; outline-offset: 5px; }
.light-section :focus-visible { outline-color: #176694; }
#main:focus { outline: none; }
.container { width: min(var(--max-width), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 12px 20px; color: var(--night); background: var(--white); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.icon { flex: 0 0 auto; width: 20px; height: 20px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 500; line-height: 1.5; letter-spacing: .13em; text-transform: uppercase; text-wrap: initial; }
.micro-note { color: var(--muted); font-size: 13px; line-height: 1.65; }
.light-section { color: var(--ink); background: var(--light); }
.light-section .eyebrow { color: var(--link); }
.light-section .micro-note { color: var(--body-ink); }

/* Brand: NELVARX remains literal text. The A is a custom vector without a crossbar. */
.brand { flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 7px; min-height: 44px; }
.wordmark { font-size: 28px; line-height: 1; letter-spacing: .26em; font-weight: 500; white-space: nowrap; }
.wordmark-a { position: relative; display: inline-block; color: transparent; }
.wordmark-a svg { position: absolute; left: 0; top: .075em; width: calc(100% - .26em); height: .74em; fill: var(--accent); }
.brand-legal { font-size: 13px; line-height: 1.25; color: var(--muted); letter-spacing: .015em; }

/* Navigation stays visible without JavaScript. The disclosure is an enhancement. */
.site-header { position: sticky; z-index: 30; top: 0; background: var(--night); border-bottom: 1px solid #233541; }
.header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.primary-nav { display: flex; gap: clamp(18px, 2.5vw, 38px); align-items: center; font-size: 14px; line-height: 1.3; }
.primary-nav a { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; color: #e2edf5; border-bottom: 1px solid transparent; }
.primary-nav a:hover { color: var(--accent); border-bottom-color: #7699af; }
.primary-nav .nav-contact { border: 1px solid #6e8b9f; padding: 8px 16px; border-radius: 3px; }
.menu-toggle { display: none; }

/* Earth is only artwork; all text above it remains selectable and accessible. */
.hero { position: relative; isolation: isolate; background: var(--night-deep); overflow: clip; }
.hero-media { position: absolute; inset: 0 0 0 auto; width: 86%; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 57%; }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night-deep) 0%, rgba(7,16,24,.87) 14%, rgba(7,16,24,.48) 34%, rgba(7,16,24,.07) 64%, rgba(7,16,24,.5) 100%), linear-gradient(0deg, var(--night-deep) 0%, transparent 22%, transparent 83%, rgba(7,16,24,.3)); }
.hero-layout { position: relative; min-height: 594px; display: grid; grid-template-columns: minmax(0, 1fr) 212px; align-items: center; gap: 70px; padding-block: 68px 56px; }
.hero-copy { max-width: 725px; min-width: 0; }
.hero-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; }
.signal { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: 0 0 5px; }
h1 { max-width: 730px; font-size: clamp(44px, 4.35vw, 66px); line-height: 1.07; letter-spacing: -.044em; }
h1 > span { display: block; color: var(--accent); }
.hero-description { max-width: 550px; margin-top: 24px; font-size: 18px; line-height: 1.65; color: #e4ecf3; text-wrap: pretty; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.hero-actions { margin-top: 30px; }
.button { min-height: 48px; display: inline-flex; justify-content: center; align-items: center; gap: 16px; padding: 12px 20px; border: 1px solid transparent; border-radius: 3px; font: 500 14px/1.5 Arial, Helvetica, sans-serif; text-align: center; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.button-primary { background: #f1f7fa; color: var(--night); }
.button-primary:hover { background: var(--accent); }
.button-outline { color: var(--white); border-color: #a0b2c0; background: #09141dd9; }
.button-outline:hover { border-color: var(--white); background: #182b39; }
.hero-copy > .micro-note { margin-top: 12px; }
.is-pending { cursor: not-allowed; }
.button.is-pending { border-style: dashed; }
.button-primary.is-pending:hover { background: #f1f7fa; }
.button-outline.is-pending:hover { background: #09141dd9; border-color: #a0b2c0; }
.hero-method { align-self: end; padding: 20px 22px; border-left: 1px solid #8aabbf; background: rgba(7,16,24,.88); margin-bottom: 16px; }
.hero-method > p { font-size: 16px; line-height: 1.5; color: var(--white); margin-bottom: 20px; }
.hero-method ol { list-style: none; padding: 16px 0 0; border-top: 1px solid #5e798c; display: grid; gap: 9px; }
.hero-method li { display: flex; align-items: center; gap: 14px; font-size: 13px; line-height: 1.5; letter-spacing: .04em; text-transform: uppercase; color: #ecf4fa; }
.hero-method li span { color: #b7cede; font-size: 12px; }

/* Services: equal-height columns, branded vectors, short contextual links. */
.expertise { padding-block: 42px 32px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 31px; }
.section-heading > p { color: var(--body-ink); font-size: 14px; line-height: 1.5; }
.services-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-card { display: grid; grid-template-rows: 48px minmax(2.8em, auto) 1fr auto; gap: 14px; padding-inline: 28px; border-left: 1px solid var(--rule); min-width: 0; }
.service-card:first-child { padding-left: 0; border-left: 0; }
.service-card:last-child { padding-right: 0; }
.service-mark { width: 45px; height: 45px; color: #153c54; transition: transform 200ms ease; transform-origin: center; }
.service-mark .mark-back { opacity: .55; }
.service-mark .mark-node { fill: #bcd9ea; stroke: #153c54; }
.service-card h3 { font-size: 20px; line-height: 1.28; letter-spacing: -.025em; text-wrap: initial; }
.service-card > p { color: var(--body-ink); font-size: 15px; line-height: 1.65; }
.text-link { display: inline-flex; align-items: center; justify-self: start; gap: 12px; min-height: 44px; padding-block: 8px; color: var(--link); font-size: 14px; line-height: 1.5; }
.text-link:hover:not(.is-pending) { text-decoration: underline; text-underline-offset: 5px; }
.services-note { margin-top: 18px; }

/* The three questions are the concise explanation of the method. */
.approach { padding-block: 44px; background: var(--light-alt); border-top: 1px solid var(--rule); }
.approach-grid { display: grid; grid-template-columns: 1.25fr repeat(3, minmax(0,.92fr)); gap: 32px; align-items: start; }
.approach-intro h2 { font-size: 28px; letter-spacing: -.03em; line-height: 1.2; margin: 16px 0; }
.approach-intro > p:last-child { font-size: 14px; line-height: 1.65; color: var(--body-ink); }
.question { padding: 4px 0 0 22px; border-left: 1px solid #bdcbd5; min-width: 0; }
.question h3 { font-size: 22px; letter-spacing: -.025em; line-height: 1.25; margin: 21px 0 14px; text-wrap: initial; }
.question > p:last-child { color: var(--body-ink); font-size: 15px; line-height: 1.65; }

/* Open Research: the illustration is supplementary, never a barrier to the links. */
.research { background: #0b151e; position: relative; padding-block: 54px; border-bottom: 1px solid #213542; }
.research-grid { display: grid; grid-template-columns: .85fr 1.3fr; align-items: center; gap: 56px; }
.research-media { min-width: 0; position: relative; display: block; }
.research-media img { width: 100%; height: auto; }
.research-media::after { content: ''; position: absolute; inset: -1px; background: linear-gradient(90deg,#0b151e 0%,transparent 12%,transparent 88%,#0b151e 100%),linear-gradient(0deg,#0b151e 0%,transparent 20%,transparent 90%,#0b151e 100%); }
.research-copy { min-width: 0; }
.research-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 19px; }
.research-heading > .eyebrow { font-size: 11px; }
.status-label { display: inline-flex; align-items: center; font-size: 12px; line-height: 1.5; border: 1px solid #657d8e; border-radius: 3px; padding: 3px 8px; color: #deebf4; }
.research h2 { font-size: clamp(29px,2.6vw,40px); letter-spacing: -.035em; line-height: 1.17; text-wrap: initial; }
.research-description { margin-top: 20px; font-size: 16px; color: #e0eaf2; line-height: 1.7; max-width: 630px; }
.research-principle { font-size: 14px; color: var(--accent); margin-top: 14px; padding-left: 13px; border-left: 1px solid #7d9aae; }
.research-actions { margin-top: 24px; gap: 12px; }
.research-copy > .micro-note { margin-top: 12px; }

/* Shared baseline keeps the two About columns aligned at every desktop width. */
.about { padding-block: 52px; }
.about > .container > .eyebrow { margin-bottom: 22px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 68px; }
.about-purpose h2 { font-size: clamp(30px, 2.7vw,40px); letter-spacing: -.035em; line-height: 1.18; }
.about-purpose h2 span { color: var(--link); }
.about-purpose > p { margin-top: 19px; color: var(--body-ink); max-width: 520px; font-size: 16px; }
.about-detail { border-left: 1px solid var(--rule); padding-left: 34px; }
.about-detail p { color: var(--body-ink); font-size: 15px; line-height: 1.7; }
.about-detail .responsibility { margin-top: 22px; color: var(--ink); }

/* Contact and legal links never use tiny low-contrast type. */
.site-footer { background: var(--night); padding-block: 43px 24px; }
.contact-row { display: grid; grid-template-columns: .85fr 1.35fr auto; align-items: start; gap: 36px; padding-bottom: 32px; }
.site-footer .brand { margin-top: 5px; }
.contact-copy h2 { font-size: 27px; line-height: 1.25; letter-spacing: -.02em; }
.contact-copy p { font-size: 15px; line-height: 1.65; margin-top: 12px; color: var(--muted); }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.phone-link { color: #e0edf5; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 28px; padding-top: 16px; border-top: 1px solid var(--rule-dark); }
.footer-bottom > p { font-size: 14px; line-height: 1.6; color: #ccd9e3; }
.footer-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; }
.footer-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; line-height: 1.5; color: #e4edf4; }
.footer-link .icon { width: 17px; height: 17px; }
.footer-link:hover:not(.is-pending) { text-decoration: underline; text-underline-offset: 5px; }
.preview-note { font-size: 13px; line-height: 1.6; color: #c0d0dc; padding-top: 10px; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service-card:hover .service-mark, .service-card:focus-within .service-mark { transform: translateY(-3px); }
  .text-link:not(.is-pending) .icon, .button:not(.is-pending) .icon { transition: transform 160ms ease; }
  .text-link:hover:not(.is-pending) .icon, .button:hover:not(.is-pending) .icon { transform: translateX(2px); }
}
@media (min-width: 1650px) {
  .hero-layout { min-height: 620px; }
}
@media (max-width: 1180px) {
  .hero-layout { grid-template-columns: minmax(0,1fr); min-height: 574px; }
  .hero-copy { max-width: 660px; }
  .hero-method { display: none; }
  h1 { font-size: clamp(42px,5.8vw,64px); }
  .hero-media { width: 100%; }
  .service-card { padding-inline: 20px; }
  .service-card h3 { font-size: 19px; }
  .approach-grid { gap: 22px; }
  .approach-intro h2 { font-size: 25px; }
  .question { padding-left: 17px; }
  .question h3 { font-size: 20px; }
  .research-grid { grid-template-columns: .76fr 1.24fr; gap: 32px; }
  .about-grid { gap: 38px; }
  .contact-row { grid-template-columns: .85fr 1.2fr auto; gap: 24px; }
  .contact-copy h2 { font-size: 24px; }
  .site-footer .wordmark { font-size: 25px; }
}
@media (max-width: 960px) {
  :root { --header-height: 84px; }
  .header-inner { gap: 24px; }
  .wordmark { font-size: 25px; }
  .primary-nav { gap: 16px; font-size: 13px; }
  .primary-nav .nav-contact { padding-inline: 12px; }
  .services-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px 0; }
  .service-card { padding-inline: 26px; grid-template-rows: 48px auto 1fr auto; }
  .service-card:nth-child(odd) { padding-left: 0; border-left: 0; }
  .service-card:nth-child(even) { padding-right: 0; }
  .service-card h3 { font-size: 21px; }
  .services-note { margin-top: 22px; }
  .approach-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 26px; }
  .approach-intro { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; column-gap: 35px; align-items: start; }
  .approach-intro .eyebrow { grid-column: 1/-1; margin-bottom: 16px; }
  .approach-intro h2 { margin: 0; }
  .question { padding-top: 0; }
  .question:first-of-type { border-left: 0; padding-left: 0; }
  .question h3 { margin-top: 14px; }
  .research-grid { grid-template-columns: .65fr 1.35fr; gap: 24px; }
  .research h2 { font-size: 32px; }
  .about-grid { gap: 30px; }
  .about-purpose h2 { font-size: 33px; }
  .about-detail { padding-left: 25px; }
  .contact-row { grid-template-columns: 1fr 1.2fr; gap: 22px; }
  .contact-actions { grid-column: 2; }
  .desktop-break { display: none; }
}
@media (max-width: 860px) {
  :root { --header-height: 78px; }
  .header-inner { flex-wrap: wrap; gap: 0; padding-block: 16px 8px; }
  .brand { gap: 6px; }
  .brand-legal { font-size: 12px; }
  .primary-nav { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 2px 14px; padding-top: 10px; }
  .primary-nav .nav-contact { padding-inline: 8px; }
  .has-js .header-inner { position: relative; padding-block: 0; }
  .has-js .menu-toggle { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 44px; padding: 9px 11px; border: 1px solid #6d889a; border-radius: 3px; background: transparent; font-size: 14px; cursor: pointer; }
  .menu-lines { position: relative; width: 17px; height: 14px; flex: 0 0 17px; }
  .menu-lines::before, .menu-lines::after { content: ''; position: absolute; width: 17px; height: 1px; background: currentColor; left: 0; top: 3px; }
  .menu-lines::after { top: 10px; }
  .menu-toggle[aria-expanded=true] .menu-lines::before { top: 6px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded=true] .menu-lines::after { top: 6px; transform: rotate(-45deg); }
  .has-js .primary-nav { position: absolute; display: none; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: 100%; width: auto; padding: 12px var(--gutter) 22px; background: var(--night); border-bottom: 1px solid #506a7c; }
  .has-js .primary-nav.is-open { display: grid; gap: 4px; }
  .has-js .primary-nav a { min-height: 46px; font-size: 16px; }
  .has-js .primary-nav .nav-contact { justify-self: start; padding-inline: 16px; margin-top: 6px; }
  .has-js .header-inner { justify-content: space-between; }
}
@media (max-width: 760px) {
  :root { --gutter: 24px; }
  .hero { display: flex; flex-direction: column; }
  .hero-layout { order: 0; min-height: 0; display: block; padding-block: 43px 0; }
  .hero-copy { max-width: 580px; }
  .hero-eyebrow { margin-bottom: 22px; font-size: 11px; letter-spacing: .12em; }
  h1 { font-size: clamp(35px, 7.9vw, 49px); line-height: 1.11; letter-spacing: -.039em; }
  .hero-description { max-width: 530px; font-size: 17px; margin-top: 22px; line-height: 1.65; }
  .hero-actions { margin-top: 26px; gap: 12px; }
  .hero-copy > .micro-note { font-size: 12px; }
  .hero-media { order: 1; position: relative; inset: auto; z-index: 0; display: block; width: 100%; height: clamp(170px, 49vw, 280px); margin-top: 3px; }
  .hero-media img { object-position: center 57%; }
  .hero-media::after { background: linear-gradient(180deg,var(--night-deep) 0%,rgba(7,16,24,.25) 20%,transparent 52%,rgba(7,16,24,.12) 72%,var(--night-deep) 100%); }
  .expertise { padding-block: 35px 26px; }
  .section-heading { display: block; margin-bottom: 30px; }
  .section-heading > p { margin-top: 10px; }
  .services-grid { gap: 28px 0; }
  .service-card { padding-inline: 20px; }
  .service-card h3 { font-size: 21px; }
  .service-card > p { font-size: 15px; }
  .approach { padding-block: 34px; }
  .approach-grid { gap: 25px; }
  .approach-intro h2 { font-size: 26px; }
  .question h3 { font-size: 21px; }
  .question > p:last-child { font-size: 14px; }
  .research { padding-block: 40px 15px; }
  .research-grid { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .research-copy { order: 0; }
  .research-media { order: 1; max-width: 450px; width: 100%; margin-inline: auto; }
  .research h2 { font-size: clamp(29px,5.7vw,36px); }
  .research-description { font-size: 16px; margin-top: 19px; }
  .research-actions .button { flex: 1 1 auto; }
  .research-heading > .eyebrow { font-size: 11px; max-width: 100%; }
  .research-heading { margin-bottom: 20px; }
  .research-copy > .micro-note { font-size: 12px; }
  .about { padding-block: 38px; }
  .about-grid { grid-template-columns: 1fr; gap: 25px; }
  .about-purpose h2 { font-size: 34px; }
  .about-purpose > p { font-size: 16px; max-width: none; }
  .about-detail { padding-left: 0; padding-top: 22px; border-left: 0; border-top: 1px solid var(--rule); }
  .about-detail p { font-size: 15px; }
  .about-detail .responsibility { border-left: 2px solid #4d7790; padding-left: 15px; }
  .site-footer { padding-block: 32px 22px; }
  .contact-row { grid-template-columns: 1fr; gap: 24px; }
  .contact-actions { grid-column: auto; }
  .contact-copy h2 { font-size: 28px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; padding-top: 22px; gap: 6px; }
  .footer-nav { gap: 5px 24px; }
  .preview-note { padding-top: 15px; }
}
@media (max-width: 520px) {
  .services-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
  .service-card, .service-card:nth-child(even), .service-card:nth-child(odd) { padding: 25px 0 18px; border-left: 0; border-top: 1px solid var(--rule); grid-template-columns: 50px minmax(0,1fr); grid-template-rows: auto auto auto; column-gap: 17px; row-gap: 9px; }
  .service-card:first-child { border-top: 0; padding-top: 0; }
  .service-mark { grid-column: 1; grid-row: 1 / span 3; }
  .service-card h3, .service-card > p, .service-card .text-link { grid-column: 2; }
  .service-card h3 { padding-top: 1px; }
  .service-card .text-link { margin-top: 2px; }
  .services-note { margin-top: 9px; }
  .approach-grid { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .approach-intro { display: block; grid-column: auto; }
  .approach-intro h2 { margin-bottom: 14px; font-size: 28px; }
  .question, .question:first-of-type { border-left: 0; border-top: 1px solid #bdcbd5; padding: 20px 0 0; }
  .question h3 { margin: 10px 0; font-size: 23px; }
  .question > p:last-child { font-size: 15px; }
  .research-actions { align-items: stretch; }
  .research-actions .button { flex-basis: 100%; }
  .research-media { max-width: 360px; }
  .research-principle { font-size: 13px; }
  .contact-actions { align-items: stretch; }
  .contact-actions .button { width: 100%; }
}
@media (max-width: 390px) {
  :root { --gutter: 20px; --header-height: 74px; }
  .wordmark { font-size: 23px; letter-spacing: .23em; }
  .wordmark-a svg { width: calc(100% - .23em); }
  .brand-legal { font-size: 11px; }
  .has-js .menu-toggle { padding-inline: 10px; gap: 8px; font-size: 13px; }
  .hero-eyebrow { font-size: 10px; letter-spacing: .1em; gap: 10px; }
  h1 { font-size: clamp(32px, 9.5vw, 37px); }
  .hero-description { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .service-card, .service-card:nth-child(even), .service-card:nth-child(odd) { grid-template-columns: 39px minmax(0,1fr); gap: 8px 14px; }
  .service-mark { width: 36px; height: 36px; }
  .service-card h3 { font-size: 20px; }
  .research h2 { font-size: 29px; }
  .about-purpose h2 { font-size: 30px; }
  .footer-nav { gap: 6px 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .service-card:hover .service-mark, .service-card:focus-within .service-mark { transform: none; }
}
@media print {
  .site-header { position: static; }
  .menu-toggle, .preview-note, .micro-note, .skip-link { display: none !important; }
  .hero-media { opacity: .2; }
  body { font-size: 12pt; }
  a[href^="https://"]::after { content: ' (' attr(href) ')'; font-size: 9pt; overflow-wrap: anywhere; }
  .service-card, .question, .research, .about { break-inside: avoid; }
}
/* With scripting disabled, keep the expanded navigation in normal document flow. */
@media (max-width: 860px) {
  html:not(.has-js) .site-header { position: relative; }
}
/* Contact inquiry form */
.contact-form {
  margin-top: 22px;
  width: min(520px, 100%);
  display: grid;
  gap: 16px;
}

.contact-form[hidden] {
  display: none !important;
}

.contact-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(245, 249, 252, 0.22);
  border-radius: 0;
  background: rgba(245, 249, 252, 0.06);
  color: var(--white);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  padding: 13px 14px;
  outline: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(245, 249, 252, 0.62);
  background: rgba(245, 249, 252, 0.09);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(245, 249, 252, 0.42);
}

.contact-form .button {
  justify-self: start;
}

.contact-form .button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.contact-form-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .contact-form {
    width: 100%;
  }

  .contact-form .button {
    width: 100%;
    justify-content: center;
  }
}
/* Contact form layout correction */
.contact-actions {
  display: block;
  width: min(560px, 100%);
}

#contact-form-toggle {
  width: auto;
}

.contact-form {
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: 100%;
  max-width: 560px;
  margin-top: 24px;
  gap: 18px;
}

.contact-form[hidden] {
  display: none !important;
}

.contact-form label {
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: 100%;
  gap: 8px;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
}

.contact-form textarea {
  min-height: 150px;
}

.contact-form > .button {
  width: auto;
  justify-self: start;
}

@media (max-width: 860px) {
  .contact-actions,
  .contact-form {
    width: 100%;
    max-width: none;
  }

  .contact-form > .button,
  #contact-form-toggle {
    width: 100%;
  }
}
