/* AnKe Studio
 *
 * 1. Tokens       colours, type, spacing - change the look here
 * 2. Base         element defaults
 * 3. Layout       containers, sections, grids
 * 4. Components   header, hero, buttons, cards, form, footer
 * 5. Utilities
 *
 * Compatibility: modern features (clamp, grid, svh, aspect-ratio) always
 * come after a plain fallback declaration, so older browsers get a simpler
 * but intact layout.
 */

/* 1. Tokens ------------------------------------------------------------ */

@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway-var-italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #faf8f3;
  --paper-deep: #f1eee5;  /* image placeholder while loading */
  --band: #ffffff;        /* white bands behind artwork sections */
  --olive-mid: #848e12;   /* tagline, shop heading, pill hover: a step darker than the menu bar */
  --ink: #2a2b24;
  --ink-soft: #55574b;
  --brand: #919c16;       /* logo olive - decorative use only (2.8:1 on paper) */
  --brand-ink: #5f6710;   /* olive for text, links and buttons (5.8:1) */
  --line: #dcd8cb;
  --header-bg: #919c16;                 /* logo olive, solid */

  --font: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --measure: 36em;
  --container: 72rem;
  --gutter: 1rem;
  --section-space: 5rem;
  --header-h: 4rem;
  --radius: 2px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

@media (min-width: 40em) {
  :root {
    --gutter: 2rem;
    --section-space: 7rem;
  }
}

/* 2. Base -------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 4rem;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: #faf8f3;
  background: var(--paper);
  color: #2a2b24;
  color: var(--ink);
  font-family: "Raleway", "Helvetica Neue", Arial, sans-serif;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 1rem;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: .01em;
}

h2,
.page-intro h1 {
  font-size: 2.24rem;
  font-size: clamp(2.07rem, 1.53rem + 1.89vw, 3.07rem);
  font-weight: 400;
}

h3 {
  font-size: 1.25rem;
  font-weight: 500;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: #5f6710;
  color: var(--brand-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

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

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

::selection {
  background: var(--brand);
  color: #fff;
}

/* 3. Layout ------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: 72rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
  padding: 0 var(--gutter);
}

.section {
  padding: 5rem 0;
  padding: var(--section-space) 0;
}

/* Tagline under the hero: 80% of the section heading size. */
.intro { /* own paper band: equal space above and below the tagline */
  padding: 5.6rem 0;
  text-align: center;
}

/* Italic olive display text: the tagline and the shop heading. */
.tagline {
  color: #848e12;
  color: var(--olive-mid);
  font-size: 1.79rem;
  font-size: clamp(1.66rem, 1.22rem + 1.51vw, 2.46rem);
  font-style: italic;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.2;
  text-wrap: balance; /* even line lengths when it wraps */
}

.tagline--lg { /* 128% of the tagline */
  font-size: 2.29rem;
  font-size: clamp(2.12rem, 1.56rem + 1.93vw, 3.15rem);
}

.intro__text {
  margin: 0;
}

.intro__text span { /* break after the comma first; each half wraps inside itself if needed */
  display: inline-block;
}

.hero + .section {
  padding-top: 2.75rem;
}

.intro + .section {
  padding-top: 3.5rem;
}

.section--white { /* bands with artwork */
  background: #fff;
  background: var(--band);
}

.section__head {
  margin-bottom: 2.5rem;
}

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

.section__head--center p {
  margin-left: auto;
  margin-right: auto;
}

.section__head .more { /* pill directly under a heading */
  margin-top: 1.5rem;
}


.section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  display: block;
  margin-bottom: .75rem;
  color: var(--brand-ink);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

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

.prose--center {
  margin-left: auto;
  margin-right: auto;
}

.prose > :last-child {
  margin-bottom: 0;
}

/* Short about text on the home page, linking to about.html */
.about-teaser {
  text-align: center;
}

.lead {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.55;
}

/* Two columns: media + text. Stacks on small screens. */
.split > * + * {
  margin-top: 2.5rem;
}

@media (min-width: 48em) {
  .split {
    display: flex;
    align-items: center;
  }
  .split > * + * {
    margin-top: 0;
    margin-left: 4rem;
  }
  .split__media {
    flex: 0 0 38%;
  }
  .split__body {
    flex: 1 1 auto;
  }
  .split--top {
    align-items: flex-start;
  }
}

/* Artwork grid: 1 column on phones, 3 from 40em. Works are never cropped. */
.art-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

.art-grid > li {
  margin-bottom: 2rem;
}

@supports (display: grid) {
  .art-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 2rem 1.5rem;
    gap: 2rem 1.5rem;
    align-items: start;
  }
  .art-grid > li {
    margin-bottom: 0;
  }
  @media (min-width: 40em) {
    .art-grid { grid-template-columns: repeat(3, 1fr); }
  }
}

/* Masonry-style portfolio using CSS columns (supported everywhere). */
.art-columns {
  margin: 0;
  padding: 0;
  list-style: none;
  -webkit-column-gap: 1.5rem;
  column-gap: 1.5rem;
}

.art-columns > li {
  display: inline-block; /* keeps items in one piece in older engines */
  width: 100%;
  margin-bottom: 1.5rem;
  -webkit-column-break-inside: avoid;
  break-inside: avoid;
}

@media (min-width: 40em) {
  .art-columns { -webkit-column-count: 2; column-count: 2; }
}

@media (min-width: 64em) {
  .art-columns { -webkit-column-count: 3; column-count: 3; }
}

/* 4. Components -------------------------------------------------------- */

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: .5rem 1rem;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 1rem;
}

/* Header: sticks to the top; content (and the hero) start below it. */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
  height: 4rem;
  height: var(--header-h);
  background: #919c16;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-header__brand {
  flex: 0 0 auto;
  margin-right: 1rem;
  color: #fff;
  font-size: 1.38rem;
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity .4s var(--ease);
}

.site-header__brand:hover {
  color: #fff;
  opacity: .8;
}

.site-header :focus-visible {
  outline-color: #fff;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li + li {
  margin-left: 1.1rem;
}

.site-nav a {
  display: block;
  padding: .5rem 0;
  color: #fff;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .4s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
}

@media (min-width: 37.5em) {
  .site-nav li + li { margin-left: 2rem; }
  .site-nav a { font-size: .85rem; }
}

/* Menu button: hidden unless JS is running and the screen is narrow. */
.nav-toggle {
  display: none;
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -.6rem; /* line the bars up with the page edge */
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  position: absolute;
  left: 50%;
  width: 1.4rem;
  height: 2px;
  margin-left: -.7rem;
  background: currentColor;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .25s var(--ease), background-color .25s var(--ease);
}

.nav-toggle__bars {
  top: 50%;
  margin-top: -1px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  left: 0;
  margin-left: 0;
}

.nav-toggle__bars::before { top: -.45rem; }
.nav-toggle__bars::after { top: .45rem; }

.is-open .nav-toggle__bars {
  background-color: transparent;
  box-shadow: none;
}

.is-open .nav-toggle__bars::before {
  -webkit-transform: translateY(.45rem) rotate(45deg);
  transform: translateY(.45rem) rotate(45deg);
}

.is-open .nav-toggle__bars::after {
  -webkit-transform: translateY(-.45rem) rotate(-45deg);
  transform: translateY(-.45rem) rotate(-45deg);
}

/* Narrow screens: name and menu no longer fit in one row (~590px). */
@media (max-width: 37.49em) {
  /* With JS: menu collapses behind the button into a drop-down panel. */
  .js .nav-toggle {
    display: block;
  }
  .js .site-header__brand {
    font-size: 1.2rem;
  }
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .35);
    visibility: hidden;
    opacity: 0;
    -webkit-transform: translateY(-.5rem);
    transform: translateY(-.5rem);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
  }
  .js .is-open .site-nav {
    visibility: visible;
    opacity: 1;
    -webkit-transform: none;
    transform: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s;
  }
  .js .site-nav ul {
    flex-direction: column;
    align-items: center;
    padding: .5rem 0 1rem;
  }
  .js .site-nav li + li {
    margin-left: 0;
  }
  .js .site-nav a {
    padding: .7rem 2rem;
    font-size: 1rem;
  }

  /* Without JS: no working button, so stack name and menu in two rows. */
  html:not(.js) {
    --header-h: 5.25rem;
  }
  html:not(.js) .site-header__inner {
    flex-direction: column;
    justify-content: center;
  }
  html:not(.js) .site-header__brand {
    margin: 0 0 .15rem;
    font-size: 1.2rem;
  }
  html:not(.js) .site-nav ul { justify-content: center; }
  html:not(.js) .site-nav a { padding: .4rem 0; }
}

@media (max-width: 23.99em) { /* very narrow phones without JS: keep nav on one line */
  html:not(.js) .site-nav li + li { margin-left: .7rem; }
  html:not(.js) .site-nav a { font-size: .72rem; letter-spacing: .1em; }
}

/* Hero: a third of the screen, so the intro is visible on first load. */
.hero {
  position: relative;
  margin-top: 2rem;
  margin-top: calc(var(--header-h) / 2); /* paper band between menu and image */
  height: 33vh;
  height: 33svh;
  min-height: 16rem;
  overflow: hidden;
  background: #3f4a1c; /* shows while the image loads */
  color: #fff;
}

.hero__image,
.hero__image img {
  width: 100%;
  height: 100%;
}

.hero__image img {
  max-width: none;
  object-fit: cover;
  object-position: 50% 30%;
}

.hero::after { /* soft shade so the white logo reads on light paper areas */
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(ellipse at center, rgba(20, 24, 8, .4) 0%, rgba(20, 24, 8, .1) 60%),
              linear-gradient(to bottom, rgba(20, 24, 8, .35) 0%, rgba(20, 24, 8, 0) 35%);
}

.hero__content {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 90%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  text-align: center;
}

.hero h1 {
  margin: 0;
}

.hero__logo {
  width: 8.75rem;
  width: clamp(6.25rem, 18.75vh, 12.5rem);
  margin: 0 auto .8rem;
  -webkit-filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .3));
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .3));
}

.hero__tagline {
  margin: 0;
  font-size: 1.45rem;
  font-size: clamp(1.32rem, 1.12rem + .79vw, 1.85rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .08em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}

@media (max-width: 23.99em) { /* very narrow phones: keep the tagline on one line */
  .hero__content { width: 100%; }
  .hero__tagline { letter-spacing: .02em; }
}

/* Artwork tile */
.art {
  margin: 0;
}

.art img {
  width: 100%;
  background: var(--paper-deep);
  box-shadow: 0 1px 2px rgba(42, 43, 36, .08), 0 8px 24px -12px rgba(42, 43, 36, .25);
}

.art figcaption {
  margin-top: .6rem;
  color: var(--ink-soft);
  font-size: .9rem;
}

/* Featured print: one large work, centred, never cropped */
.feature__art {
  max-width: 60rem;
  margin: 0 auto;
}

/* Buttons and text links */
.button {
  display: inline-block;
  padding: .85rem 1.6rem;
  border: 1px solid var(--brand-ink);
  border-radius: var(--radius);
  background: var(--brand-ink);
  color: #fff;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

.button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.button[disabled] {
  opacity: .6;
  cursor: progress;
}

.button--ghost {
  background: transparent;
  color: var(--brand-ink);
}

/* "Browse prints" etc.: centred pill styled like the menu bar. */
.more {
  margin: 2.5rem 0 0;
  text-align: center;
}

.pill {
  display: inline-block;
  padding: .85rem 1.9rem;
  border-radius: 999px;
  background: #919c16;
  background: var(--header-bg);
  color: #fff;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.2;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  text-transform: uppercase;
  transition: background-color .25s var(--ease), -webkit-transform .25s var(--ease);
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}

.pill:hover {
  background: #848e12;
  background: var(--olive-mid);
  color: #fff;
  -webkit-transform: translateY(-1px);
  transform: translateY(-1px);
}

/* Link cards (Shop / Instagram) */
.cards {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards > li + li {
  margin-top: 1.5rem;
}

@media (min-width: 48em) {
  .cards {
    display: flex;
  }
  .cards > li {
    flex: 1 1 0;
  }
  .cards > li + li {
    margin-top: 0;
    margin-left: 1.5rem;
  }
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .25s var(--ease), -webkit-transform .25s var(--ease);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}

.card:hover {
  border-color: var(--brand);
  color: var(--ink);
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
}

.card__icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: 1.25rem;
  color: var(--brand);
}

.card__title {
  margin-bottom: .5rem;
}

.card p {
  flex: 1 0 auto;
  color: var(--ink-soft);
}

.card__cta {
  color: var(--brand-ink);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Olive section: menu-bar olive background, everything white (inverted). */
.section--olive {
  background: #919c16;
  background: var(--header-bg);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.section--olive .tagline {
  color: #fff;
}

.section--olive .pill {
  background: #fff;
  color: #5f6710;
  color: var(--brand-ink);
  text-shadow: none;
}

.section--olive .pill:hover {
  background: var(--paper);
  color: var(--ink);
}

.section--olive .card {
  background: transparent;
  border-color: rgba(255, 255, 255, .6);
  color: #fff;
}

.section--olive .card:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .08);
}

.section--olive .card__icon,
.section--olive .card p,
.section--olive .card__cta {
  color: #fff;
}

.section--olive :focus-visible {
  outline-color: #fff;
}

/* Contact form */
.form {
  max-width: 36rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: .35rem;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid #b9b5a6;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16px+ stops iOS zooming on focus */
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

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

.field input:focus,
.field textarea:focus {
  border-color: var(--brand-ink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(145, 156, 22, .3);
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.form__status {
  flex-basis: 100%;
  margin: 1rem 0 0;
  font-size: .95rem;
}

.form__status.is-error {
  color: #9b2c1c;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .85rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.site-footer ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-left: 1.5rem;
}

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

/* Page intro for sub-pages (no hero) */
.page-intro {
  padding-top: 4rem;
}

/* 5. Utilities --------------------------------------------------------- */

.nowrap {
  white-space: nowrap;
}

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

/* Spam trap: hidden from people, visible to naive bots. */
.hp-field {
  position: absolute;
  left: -9999px;
}

