/* ==========================================================================
   Arkon IT – arkonit.se
   Palette and typography carried over from the old WordPress theme:
   orange #e68b2b, warm grey #5e5d5c, serif headings (Cambria / Droid Serif).
   ========================================================================== */

:root {
  --orange: #e68b2b;          /* brand accent (old theme heading colour) */
  --orange-strong: #c46a17;   /* buttons / links – passes WCAG AA on white */
  --orange-deep: #a3570f;
  --orange-soft: #fdf3e8;
  --orange-line: #f3d3b0;

  --ink: #2b2a29;
  --grey: #5e5d5c;            /* old theme text grey */
  --grey-light: #8a8987;
  --line: #e7e4e0;
  --paper: #ffffff;
  --paper-warm: #faf8f5;
  --dark: #242322;

  --font-serif: Cambria, "Droid Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(43, 42, 41, .06), 0 1px 3px rgba(43, 42, 41, .08);
  --shadow: 0 10px 30px -12px rgba(43, 42, 41, .18), 0 2px 6px rgba(43, 42, 41, .06);
  --container: 1140px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--grey);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

a { color: var(--orange-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-deep); }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange-strong); color: #fff; }
.btn-primary:hover { background: var(--orange-deep); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn-ghost:hover { border-color: var(--orange); color: var(--ink); }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }

/* Wordmark – echoes the old logo: serif "Arkon IT" over double orange rules */
.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-name { font-family: var(--font-serif); font-size: 1.65rem; color: var(--ink); letter-spacing: -.01em; }
.brand-rule { display: block; height: 6px; margin-top: 5px; border-top: 2px solid var(--orange); border-bottom: 2px solid var(--orange); width: 100%; }
.brand:hover .brand-name { color: var(--ink); }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.nav-list a {
  display: block; padding: .5rem .85rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { background: var(--orange-soft); color: var(--orange-deep); }
.nav-list .nav-cta a { background: var(--orange-strong); color: #fff; margin-left: .5rem; }
.nav-list .nav-cta a:hover { background: var(--orange-deep); color: #fff; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 44px; height: 44px; padding: 0; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; margin: auto; }

@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.25rem; gap: .15rem; }
  .nav-list a { border-radius: var(--radius-sm); padding: .8rem 1rem; }
  .nav-list .nav-cta a { margin: .5rem 0 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--orange-soft), transparent 70%),
    var(--paper-warm);
  border-bottom: 1px solid var(--line);
}
/* faint drawing-sheet grid, a nod to technical drawings */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(230, 139, 43, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(230, 139, 43, .08) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--orange-deep); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--orange); }
.hero h1 span { color: var(--orange-strong); white-space: nowrap; }
.hero .lead { font-size: clamp(1.1rem, 1.8vw, 1.25rem); max-width: 34em; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Hero contact card – Fredrik as the first point of contact */
.hero-contact {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.4); box-shadow: var(--shadow);
  padding: 1.75rem; max-width: 440px; justify-self: end; width: 100%;
}
.hero-contact::before {
  content: ""; position: absolute; inset: -10px -10px auto auto; width: 90px; height: 90px; z-index: -1;
  border-top: 3px solid var(--orange); border-right: 3px solid var(--orange); border-radius: 0 calc(var(--radius) * 1.6) 0 0;
}
.hero-contact-top { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1.25rem; }
.portrait {
  flex: none; width: 88px; height: 88px; border-radius: 50%; overflow: hidden;
  background: var(--paper-warm); border: 3px solid var(--paper); box-shadow: 0 0 0 2px var(--orange-line);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.9); transform-origin: 55% 22%; }
.hero-contact .kicker { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-deep); margin: 0 0 .2rem; }
.hero-contact h2 { font-size: 1.45rem; margin: 0; }
.hero-contact p.note { font-size: .98rem; margin-bottom: 1.25rem; }
.contact-actions { display: grid; gap: .6rem; }
.contact-actions .btn { justify-content: center; width: 100%; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3aa65b; margin-right: .4rem; box-shadow: 0 0 0 3px rgba(58, 166, 91, .18); }

/* Customer logos – shown in black, regardless of brand colours */
.logo-mono { filter: grayscale(1) brightness(0); opacity: .78; transition: opacity .2s; }
.logo-strip { position: relative; margin-top: clamp(3rem, 6vw, 4.5rem); }
.logo-strip p { text-align: center; font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-light); margin-bottom: 1.25rem; }
.logo-strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem clamp(2rem, 5vw, 3.5rem); }
.logo-strip a:hover .logo-mono { opacity: 1; }
.logo-strip img { height: var(--h, 34px); width: auto; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section-alt { background: var(--paper-warm); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head p { font-size: 1.125rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.card {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--orange-line); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--orange-soft); color: var(--orange-strong); margin-bottom: 1.1rem;
}
.card-icon svg { width: 24px; height: 24px; }

/* product cards */
.product-card { display: flex; flex-direction: column; padding: 2rem; }
.product-card .tag { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--grey-light); margin-bottom: .5rem; }
.product-card h3 { font-size: 1.6rem; }
.product-card .more { margin-top: auto; padding-top: 1rem; font-weight: 600; text-decoration: none; }
.product-card .more::after { content: " →"; }
.product-card a.stretched::before { content: ""; position: absolute; inset: 0; }

/* customers */
.customer { border-left: 3px solid var(--orange); }
.customer h3 { font-size: 1.2rem; }
.customer .meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.chip { font-size: .78rem; padding: .2rem .6rem; border-radius: 999px; background: var(--paper-warm); border: 1px solid var(--line); color: var(--grey); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.person { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; }
.person:hover { transform: none; }
.avatar {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-serif); font-weight: 700;
  background: var(--orange-soft); color: var(--orange-deep); border: 1px solid var(--orange-line);
}
.person h3 { font-size: 1.05rem; margin-bottom: .25rem; font-family: var(--font-sans); }
.person a { display: block; font-size: .92rem; text-decoration: none; overflow-wrap: anywhere; }
.person a:hover { text-decoration: underline; }

.contact-aside { display: grid; gap: 1rem; }
.contact-box { padding: 1.75rem; }
.contact-box h3 { display: flex; align-items: center; gap: .6rem; }
.contact-box h3 svg { width: 22px; height: 22px; color: var(--orange-strong); }
.contact-lines { list-style: none; margin: 0 0 1rem; padding: 0; }
.contact-lines li { padding: .35rem 0; }
.contact-lines a { font-weight: 600; text-decoration: none; }

/* featured contact (Fredrik) */
.contact-featured { display: grid; grid-template-columns: 160px 1fr; gap: 1.75rem; align-items: center; padding: 2rem; margin-bottom: 1.25rem; border-color: var(--orange-line); background: linear-gradient(135deg, var(--orange-soft), var(--paper) 60%); }
.contact-featured:hover { transform: none; }
.contact-featured .portrait { width: 160px; height: 160px; border-width: 5px; }
.contact-featured .portrait img { transform: scale(1.7); }
.contact-featured h3 { font-size: 1.6rem; margin-bottom: .3rem; }
.contact-featured .contact-actions { display: flex; flex-wrap: wrap; margin-top: 1.25rem; }
.contact-featured .contact-actions .btn { width: auto; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards-3 { grid-template-columns: 1fr; } }
.people-label { font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-light); margin: 2rem 0 1rem; }

/* offices */
.offices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: clamp(2.5rem, 6vw, 4rem); }
.office { display: flex; gap: 1.1rem; align-items: flex-start; }
.office .card-icon { margin: 0; flex: none; }
.office h3 { margin-bottom: .25rem; }
.office address { font-style: normal; }
.office .tag-main { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--orange-soft); color: var(--orange-deep); border: 1px solid var(--orange-line); margin-left: .4rem; vertical-align: middle; font-family: var(--font-sans); }

/* customer cards */
.customer-logo { height: 56px; display: flex; align-items: center; margin-bottom: 1.25rem; }
.customer-logo img { max-height: var(--h, 40px); max-width: 190px; width: auto; height: auto; }
.card:hover .logo-mono { opacity: 1; }

/* header phone */
.header-phone { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--ink); text-decoration: none; font-size: .95rem; margin-left: .75rem; white-space: nowrap; }
.header-phone svg { width: 18px; height: 18px; color: var(--orange-strong); }
@media (max-width: 1080px) { .header-phone { display: none; } }

/* mobile call bar */
.call-bar { display: none; }
@media (max-width: 820px) {
  .call-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(43, 42, 41, .08);
  }
  .call-bar .btn { justify-content: center; padding: .7rem 1rem; }
  body { padding-bottom: 76px; }
}

/* CTA band */
.cta-band {
  background: var(--dark); color: #d9d6d2; border-radius: calc(var(--radius) * 1.5);
  padding: clamp(2rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap; gap: 1.5rem;
  align-items: center; justify-content: space-between;
  background-image: radial-gradient(40rem 20rem at 100% 0%, rgba(230, 139, 43, .28), transparent 60%);
}
.cta-band h2 { color: #fff; margin-bottom: .3rem; }
.cta-band p { margin: 0; }

/* ---------- Sub pages ---------- */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem); background: var(--paper-warm); border-bottom: 1px solid var(--line); }
.breadcrumbs { font-size: .9rem; margin-bottom: 1rem; color: var(--grey-light); }
.breadcrumbs a { color: var(--grey); text-decoration: none; }
.breadcrumbs a:hover { color: var(--orange-strong); }
.prose { max-width: 42rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--orange); }
.figure-card { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-sm); }
.figure-card figcaption { font-size: .85rem; color: var(--grey-light); margin-top: .5rem; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #b7b3ae; padding: 3.5rem 0 2rem; margin-top: clamp(4rem, 9vw, 6.5rem); font-size: .95rem; }
.site-footer a { color: #e9e6e2; text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.site-footer .brand-name { color: #fff; }
.site-footer h4 { font-family: var(--font-sans); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: .2rem 0; }
.footer-bottom { padding-top: 1.5rem; font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid, .two-col, .contact-grid { grid-template-columns: 1fr; }
  .hero-contact { justify-self: start; }
  .offices { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .contact-featured { grid-template-columns: 1fr; text-align: left; padding: 1.5rem; }
  .contact-featured .portrait { width: 120px; height: 120px; }
  .contact-featured .contact-actions .btn { width: 100%; }
  .hero-contact { padding: 1.4rem; }
}

/* reveal-on-scroll (progressive – content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* sub page helpers */
.page-lead { max-width: 42rem; font-size: 1.2rem; margin: 0 0 1.75rem; }
.prose h2.first { margin-top: 0; }
.cards.single { grid-template-columns: 1fr; }
.not-found { border-bottom: 0; background: transparent; text-align: center; }
.not-found .container { padding-block: 3rem; }
.not-found p:not(.eyebrow) { max-width: 32rem; margin: 0 auto 2rem; }
.not-found .hero-actions { justify-content: center; }
.cta-person { display: flex; gap: 1.25rem; align-items: center; }
.cta-person .portrait { width: 76px; height: 76px; border-color: #3a3836; box-shadow: 0 0 0 2px rgba(230, 139, 43, .5); }
.cta-band a:not(.btn) { color: #fff; }
@media (max-width: 560px) { .cta-person { flex-direction: column; align-items: flex-start; } }
