/* =========================================================================
   Stylesheet for lukasz-pudlo.
   One family, Schibsted Grotesk, on cream. Black ink, one green for links and
   the button. Structure comes from type size and space; rules only separate
   rows of a list. No panels, no decoration, no entrance motion.
   ========================================================================= */

/* ---------- 1. Fonts ---------- */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../../fonts/schibsted-grotesk-normal.ba4038fc5cb5.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../../fonts/schibsted-grotesk-italic.0ef3a090f2eb.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

/* A fallback sized to Schibsted Grotesk's metrics, so text barely moves when the
   web font arrives. Figures measured from the two fonts' average glyph widths. */
@font-face {
  font-family: "Schibsted Fallback";
  src: local("Arial"), local("Liberation Sans"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 104.5%;
  ascent-override: 93.45%;
  descent-override: 24.67%;
  line-gap-override: 0%;
}

/* ---------- 2. Tokens ---------- */

:root {
  --paper: #ece3cc;
  --ink: #000;
  --ink-muted: #5b5648;
  --line: #c9bd9e;
  --accent: #184a3a;
  --accent-hover: #0f3327;
  --screen: #fff;

  --font-sans: "Schibsted Grotesk", "Schibsted Fallback", Arial, Helvetica, sans-serif;

  --text-sm: 0.875rem;
  --leading-sm: 1.25rem;
  --text-base: 1.0625rem;
  --leading-base: 1.6875rem;
  --text-lead: 1.3125rem;
  --leading-lead: 1.875rem;
  --text-h2: 1.625rem;
  --leading-h2: 2rem;
  --text-h1: 2.125rem;
  --leading-h1: 2.5rem;
  --text-statement: 2.75rem;
  --leading-statement: 3.125rem;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-24: 6rem;

  --measure: 62ch;
  --shell: 1040px;
  --gutter: clamp(16px, 5vw, 48px);
  --rule: 1px solid var(--line);
  --rule-ink: 1px solid var(--ink);
}

@media (max-width: 599px) {
  :root {
    --text-statement: 2.25rem;
    --leading-statement: 2.625rem;
    --text-h1: 1.875rem;
    --leading-h1: 2.25rem;
  }
}

/* ---------- 3. Reset and type ---------- */

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

html {
  color-scheme: light;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
}

h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
}

h3 {
  font-size: var(--text-base);
  line-height: var(--leading-base);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--accent-hover);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.small {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.muted {
  color: var(--ink-muted);
}

.lead {
  max-width: var(--measure);
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
}

.prose {
  max-width: var(--measure);
}

.prose p + p,
.prose ul,
.prose ol {
  margin-top: var(--s-4);
}

/* ---------- 4. Shell ---------- */

.site-shell {
  width: min(var(--shell), 100%);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--s-12);
}

.page-shell {
  padding-top: var(--s-12);
}

@media (min-width: 880px) {
  .page-shell {
    padding-top: var(--s-16);
  }
}

/* A page section is separated from the one before it by space alone. */
.section + .section {
  margin-top: var(--s-16);
}

@media (max-width: 599px) {
  .section + .section {
    margin-top: var(--s-12);
  }
}

.section__title {
  margin-bottom: var(--s-6);
}

h1 + .lead {
  margin-top: var(--s-4);
}

/* ---------- 5. Site header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3) var(--s-8);
  padding: var(--s-6) 0 var(--s-4);
  border-bottom: var(--rule-ink);
}

.site-header__brand {
  color: var(--ink);
  font-size: var(--text-lead);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-header__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
}

.site-header__nav a {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-header__nav a:hover {
  border-bottom-color: var(--line);
}

.site-header__nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

/* ---------- 6. Buttons, links and rows ---------- */

.button {
  display: inline-block;
  padding: var(--s-3) var(--s-6);
  background: var(--accent);
  color: var(--paper);
  font-weight: 600;
  line-height: var(--leading-base);
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: background-color 120ms ease, border-color 120ms ease;
}

.button:hover,
.button:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--paper);
}

.button:active {
  transform: translateY(1px);
}

.link {
  font-weight: 600;
}

/* Actions that sit together: a button and a plain link, or two links. */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-6);
}

/* A list whose rows are separated by a rule. Used for facts, prices and services. */
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--rule);
}

.rows > * {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-1) var(--s-6);
  padding: var(--s-3) 0;
  border-bottom: var(--rule);
}

.rows dt {
  color: var(--ink-muted);
}

.rows dd {
  margin: 0;
}

@media (min-width: 600px) {
  .rows--facts > * {
    grid-template-columns: 9rem minmax(0, 1fr);
  }
}

/* ---------- 7. Form controls ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-width: 0;
}

.field label {
  font-weight: 600;
}

.field__hint {
  font-weight: 400;
  color: var(--ink-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  margin: 0;
  padding: var(--s-3) var(--s-4);
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: var(--rule-ink);
  border-radius: 0;
  box-shadow: none;
  appearance: none;
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-muted);
  opacity: 1;
}

.field__select {
  position: relative;
}

.field__select select {
  padding-right: var(--s-12);
  cursor: pointer;
}

.field__select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--s-4);
  width: 0.55em;
  height: 0.55em;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field [aria-invalid="true"] {
  border-width: 2px;
}

.field__error {
  color: var(--ink);
  font-weight: 600;
}

/* ======================================================================
   Sections below are the previous page styles, replaced page by page.
   ====================================================================== */

/* ---------- 8. Home ---------- */

.hero {
  display: grid;
  gap: var(--s-6);
  justify-items: start;
}

.statement {
  max-width: 24ch;
  font-size: var(--text-statement);
  line-height: var(--leading-statement);
  letter-spacing: -0.015em;
}

.hero .actions {
  margin-top: var(--s-2);
}

.work {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-12);
}

.work__item {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4) var(--s-8);
  align-items: start;
}

@media (min-width: 760px) {
  .work__item {
    grid-template-columns: minmax(0, 560px) minmax(14rem, 1fr);
  }
}

.work__shot {
  display: block;
  background: var(--screen);
  border: var(--rule);
}

.work__shot img {
  width: 100%;
}

.work__text {
  display: grid;
  gap: var(--s-2);
  max-width: 40ch;
}

.work__client {
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
}

.work__client a {
  color: var(--ink);
  text-decoration: none;
}

.work__client a:hover,
.work__client a:focus-visible {
  text-decoration: underline;
}

.quotes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-8);
  max-width: var(--measure);
}

.quotes__text {
  margin: 0 0 var(--s-2);
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
}

/* The steps are a genuine sequence, so they carry numbers. */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-6);
  max-width: var(--measure);
}

.steps > li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: var(--s-1) var(--s-4);
}

.steps > li::before {
  counter-increment: step;
  content: counter(step);
  grid-row: 1 / 3;
  font-weight: 600;
}

/* ---------- 9. Portfolio: project tabs ---------- */

.case-tabs {
  padding: var(--s-3) 0;
  border-bottom: var(--rule);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.case-tabs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
}

.case-tabs a {
  color: var(--ink-muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.case-tabs a:hover {
  color: var(--ink);
  border-bottom-color: var(--line);
}

.case-tabs a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- 10. Case study ---------- */

.case__header {
  display: grid;
  gap: var(--s-6);
}

.case__facts {
  max-width: var(--measure);
}

.case__facts dd a {
  color: var(--ink);
}

.screen {
  display: grid;
  gap: var(--s-3);
}

.screen__shot {
  background: var(--screen);
  border: var(--rule);
}

.screen__shot img {
  width: 100%;
}

.screen__frame {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 28rem;
  border: 0;
  background: var(--screen);
}

.screen__caption {
  display: grid;
  gap: var(--s-1);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--ink-muted);
}

.screen__load {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.screen__load:hover {
  color: var(--accent-hover);
}

.case__body {
  display: grid;
  gap: var(--s-12);
}

.case__part {
  display: grid;
  gap: var(--s-4);
  max-width: var(--measure);
}

.parts {
  margin: 0;
  padding-left: 1.2em;
  list-style: disc;
}

.parts li + li {
  margin-top: var(--s-1);
}

.case__part--outcome {
  grid-template-columns: 1fr;
  align-items: start;
}

.case__part--outcome > div {
  display: grid;
  gap: var(--s-4);
}

.case__phone {
  width: 240px;
  border: var(--rule);
  background: var(--screen);
}

@media (min-width: 880px) {
  .case__part--outcome {
    max-width: none;
    grid-template-columns: minmax(0, var(--measure)) 240px;
    gap: var(--s-12);
  }
}

.case__foot {
  display: grid;
  gap: var(--s-6);
  padding-top: var(--s-8);
  border-top: var(--rule);
}

/* ---------- 13. About ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
  align-items: start;
}

@media (min-width: 760px) {
  .about {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: var(--s-12);
  }
}

.about__text {
  display: grid;
  gap: var(--s-6);
}

.about__text h1 + .lead {
  margin-top: 0;
}

.about__photo {
  width: 100%;
  max-width: 280px;
  border: var(--rule);
}

.about__practice {
  margin-top: var(--s-12);
}

.about__practice,
.coverage {
  max-width: 76ch;
}

@media (min-width: 600px) {
  .about__practice > *,
  .coverage > * {
    grid-template-columns: 13rem minmax(0, 1fr);
  }
}

.about__tools {
  margin-top: var(--s-6);
}

/* ---------- 13b. Contact ---------- */

.brief-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6) var(--s-8);
  max-width: var(--measure);
}

@media (min-width: 760px) {
  .brief-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field--wide {
    grid-column: 1 / -1;
  }
}

.brief-form__submit {
  margin-top: var(--s-2);
  align-items: flex-start;
}

.contact-direct {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
  margin-top: var(--s-12);
}

.contact-email-button {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  max-width: 100%;
}

.contact-email-button__link {
  overflow-wrap: anywhere;
}

.contact-email-button__copy {
  padding: var(--s-3) var(--s-6);
  color: var(--accent);
  font-weight: 600;
  line-height: var(--leading-base);
  border: 1px solid var(--accent);
  border-left: 0;
  transition: background-color 120ms ease, color 120ms ease;
}

.contact-email-button__copy:hover,
.contact-email-button__copy:focus-visible,
.contact-email-button__copy.is-done {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--paper);
}

/* Reserved line: the confirmation appears here so nothing moves when it shows. */
.contact-email-button__status {
  min-height: var(--leading-sm);
}

.notice {
  display: grid;
  gap: var(--s-4);
  justify-items: start;
  max-width: var(--measure);
}

.contact-meta {
  max-width: var(--measure);
}

@media (max-width: 599px) {
  .contact-email-button {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .contact-email-button__link {
    text-align: center;
  }

  .contact-email-button__copy {
    border-left: 1px solid var(--accent);
    border-top: 0;
  }
}

/* ---------- 13a. Prices ---------- */

.tiers {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--rule);
}

.tier {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4) var(--s-12);
  padding: var(--s-8) 0;
  border-bottom: var(--rule);
}

@media (min-width: 760px) {
  .tier {
    grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr);
  }
}

.tier__head {
  display: grid;
  gap: var(--s-1);
  align-content: start;
}

.tier__name {
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
}

.tier__amount {
  font-weight: 600;
}

.tier__amount .muted {
  font-weight: 400;
}

.tier__body {
  display: grid;
  gap: var(--s-4);
  max-width: var(--measure);
}

.tier__includes {
  margin: 0;
  padding-left: 1.2em;
  list-style: disc;
}

.tier__includes li + li {
  margin-top: var(--s-1);
}

.price-note {
  margin-top: var(--s-8);
}

.section .actions {
  margin-top: var(--s-6);
}

/* ---------- 14. Site footer ---------- */

.site-footer {
  display: grid;
  gap: var(--s-1);
  margin-top: var(--s-24);
  padding-top: var(--s-6);
  border-top: var(--rule-ink);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--ink-muted);
}

.site-footer a {
  color: var(--ink);
}

.site-footer__copyright {
  margin-top: var(--s-3);
}

/* ---------- 15. Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 17. Utility ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
