/* Art for Eggy — one stylesheet for every page. */
:root {
  --bg: #000;
  --panel: #0d0d0d;
  --fg: #fff;
  --muted: #b8b8b8;
  --line: rgba(255, 255, 255, 0.22);
  --accent: #f2c14e; /* Eggy yellow */
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--fg); color: var(--bg); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 24px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px;
}
.brand { font-weight: 800; font-size: 22px; text-decoration: none; letter-spacing: -0.02em; }
.site-nav { display: flex; gap: 6px 26px; flex-wrap: wrap; }
.site-nav a { font-weight: 600; font-size: 15px; text-decoration: none; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--accent); }

/* Hero: the gecko "Creation" image shows through the big letters */
.hero { padding: clamp(40px, 9vw, 120px) 0 clamp(32px, 6vw, 80px); overflow: hidden; }
/* The box hugs the letters and the image is sized and placed in em,
   so Eggy's eye stays in the middle of the E at every screen width. */
.hero h1 {
  width: fit-content;
  margin: 0 auto;
  font-weight: 900;
  font-size: 12.4vw;
  line-height: 0.88;
  letter-spacing: -0.055em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  background: url("/img/creation.jpg") no-repeat;
  background-size: var(--hero-w) auto;
  background-position: var(--hero-x) var(--hero-y);
  -webkit-background-clip: text;
  background-clip: text;
  animation: reveal 1.4s cubic-bezier(.2, .7, .2, 1) both;
  --hero-w: 8em; --hero-x: -0.582em; --hero-y: -1.746em;
}
@media (min-width: 1500px) { .hero h1 { font-size: 186px; } }
@media (max-width: 640px) {
  .hero h1 { font-size: 24vw; white-space: normal; --hero-w: 8.3em; --hero-x: -4.236em; --hero-y: -0.951em; }
  .hero h1 span { display: block; }
}
@keyframes reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Sections */
.section { padding: clamp(56px, 9vw, 120px) 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.section-title { font-size: clamp(44px, 7vw, 76px); font-weight: 800; margin-bottom: clamp(28px, 4vw, 56px); }
.page-title { font-size: clamp(44px, 7vw, 76px); font-weight: 800; padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); }
.lede { color: var(--muted); max-width: 60ch; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.about img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 62%; }
.about h3 { font-size: 24px; font-weight: 700; margin-bottom: 18px; }
.about .text { max-width: 60ch; }
.motto { font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 26px; border: 1px solid var(--fg);
  font-weight: 600; font-size: 15px; text-decoration: none; background: transparent; color: var(--fg);
  cursor: pointer; font-family: inherit; transition: background .15s, color .15s;
}
.btn:hover, .btn:focus-visible { background: var(--fg); color: var(--bg); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.btn-solid { background: var(--fg); color: var(--bg); }
.btn-solid:hover, .btn-solid:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* Available + In Eggy's tank now */
.avail {
  position: absolute; top: 10px; left: 10px; z-index: 1; background: var(--accent); color: #000;
  font-size: 12px; font-weight: 800; letter-spacing: .02em; padding: 4px 9px; text-transform: uppercase;
}
.avail.soon { background: rgba(0, 0, 0, .78); color: var(--accent); border: 1px solid var(--accent); }
.tank-pic { position: relative; }
.soon-line { color: var(--accent); font-weight: 600; margin: -4px 0 14px; }
.soon-note { color: var(--muted); font-size: 15px; border-left: 2px solid var(--accent); padding-left: 12px; }
.tank-tag { display: inline-block; color: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 12px; }
.tank-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.tank-pic { display: block; background: var(--panel); }
.tank-pic img { width: 100%; max-height: 78vh; object-fit: contain; }
.tank-text h2 { font-size: clamp(36px, 5vw, 60px); font-weight: 800; margin-bottom: 10px; }
.muted-line { color: var(--muted); font-weight: 600; margin-bottom: 18px; }
@media (max-width: 760px) { .tank-grid { grid-template-columns: minmax(0, 1fr); } }
/* 2–4 paintings around the tank: they share a row and shrink to fit */
.tank-cards { display: grid; gap: clamp(16px, 3vw, 36px); align-items: start; }
.tank-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tank-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tank-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tank-card .tank-pic { aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tank-card .tank-pic img { width: 100%; height: 100%; max-height: none; object-fit: cover; transition: transform .5s ease; }
.tank-card .tank-pic:hover img { transform: scale(1.03); }
.tank-card h3 { font-size: clamp(18px, 2vw, 24px); font-weight: 700; margin: 14px 0 4px; }
.tank-card h3 a { text-decoration: none; }
.tank-card .muted-line { font-size: 14px; margin-bottom: 10px; }
.tank-card .btn-row { margin-top: 4px; }
.tank-card .btn { padding: 9px 14px; font-size: 14px; }
@media (max-width: 900px) { .tank-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tank-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .tank-2, .tank-4 { gap: 12px; } .tank-card h3 { font-size: 16px; } .tank-card .btn { padding: 8px 10px; font-size: 13px; } }

/* Painting grid */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.card { text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
.card .frame { aspect-ratio: 4 / 5; overflow: hidden; background: var(--panel); position: relative; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover img { transform: scale(1.04); }
.card span { font-weight: 700; font-size: 17px; text-align: center; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Forms */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact h3 { font-size: 24px; font-weight: 700; margin-bottom: 14px; }
.contact-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 32% 50%; }
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.field { display: flex; flex-direction: column; margin-bottom: 26px; }
.field label { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field textarea {
  background: transparent; color: var(--fg); border: 0; border-bottom: 1px solid var(--line);
  font: inherit; padding: 8px 0; border-radius: 0;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.check { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 28px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); }
.req { color: var(--accent); }
.hidden { display: none; }

/* Story */
.story-row { display: grid; grid-template-columns: 1fr 1fr; min-height: 520px; }
.story-row figure { margin: 0; overflow: hidden; background: var(--panel); position: relative; }
.story-row figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-row .text {
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: clamp(36px, 6vw, 80px) clamp(24px, 6vw, 88px);
}
.story-row h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; margin-bottom: 22px; }
.story-row p { max-width: 46ch; color: #e6e6e6; }
.story-row:nth-child(even) figure { order: 2; }
/* The three closing buttons share one row at every width */
.story-row .btn-row { flex-wrap: nowrap; gap: 10px; width: 100%; max-width: 460px; justify-content: center; }
.story-row .btn-row .btn { flex: 1 1 0; min-width: 0; padding: 12px 6px; text-align: center; white-space: nowrap; font-size: clamp(12.5px, 3.6vw, 15px); }

/* Eggy Photos: masonry columns + full-size viewer */
.photos { columns: 3 300px; column-gap: clamp(12px, 2vw, 24px); padding-bottom: clamp(56px, 8vw, 104px); }
.photo { display: block; margin-bottom: clamp(12px, 2vw, 24px); break-inside: avoid; overflow: hidden; background: var(--panel); cursor: zoom-in; }
.photo img { width: 100%; transition: transform .5s ease, opacity .2s; }
.photo:hover img { transform: scale(1.03); }
@media (max-width: 640px) { .photos { columns: 2; } }
.viewer { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.viewer::backdrop { background: rgba(0, 0, 0, 0.94); }
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: calc(100vw - 120px); max-height: calc(100vh - 48px); width: auto; height: auto; }
.viewer button {
  position: fixed; background: transparent; color: var(--fg); border: 0; cursor: pointer;
  font: 300 48px/1 "Inter", Arial, sans-serif; padding: 8px 16px; opacity: .75;
}
.viewer button:hover, .viewer button:focus-visible { opacity: 1; color: var(--accent); }
.v-close { top: 12px; right: 12px; }
.v-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.v-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .viewer img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .v-prev, .v-next { top: auto; bottom: 16px; transform: none; }
}

/* Painting page */
.piece-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); }
.piece-head h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 800; margin-bottom: 26px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.piece-img { display: block; margin: 0 auto; max-height: 88vh; width: auto; }
.piece-img-link { display: block; cursor: zoom-in; }
.pager { display: flex; justify-content: space-between; gap: 16px; padding: clamp(40px, 6vw, 72px) 0; flex-wrap: wrap; }
.pager a { text-decoration: none; font-weight: 600; }
.pager a:hover { text-decoration: underline; text-underline-offset: 5px; }
.pager .next { margin-left: auto; text-align: right; }
.pager small { display: block; color: var(--muted); font-weight: 400; }

/* Footer */
.site-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: clamp(48px, 7vw, 88px) 0 40px; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 72px; align-items: start; }
.site-footer h2 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.site-footer p { color: var(--muted); }
.signup { display: flex; flex-direction: column; gap: 14px; }
.signup-label { font-weight: 600; font-size: 14px; }
.signup .inline { display: flex; }
.signup input[type="email"] {
  flex: 1; min-width: 0; background: transparent; color: var(--fg); font: inherit;
  border: 1px solid var(--line); border-right: 0; padding: 12px 14px; border-radius: 0;
}
.signup input[type="email"]:focus { outline: none; border-color: var(--accent); }
.signup .check { margin: 0; font-size: 14px; color: var(--muted); }
.copyright { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin: 24px 0 0; }

/* Small screens */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .about, .contact, .piece-head, .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
  .site-nav { gap: 6px 18px; }
  .site-nav a { font-size: 14.5px; }
  .about img, .contact-img { aspect-ratio: 1 / 1; }
  .story-row { grid-template-columns: 1fr; min-height: 0; }
  .story-row figure { aspect-ratio: 4 / 3; }
  .story-row:nth-child(even) figure { order: 0; }
  form .row { grid-template-columns: 1fr; }
}
/* keep the menu on one line on narrow phones */
@media (max-width: 400px) {
  .site-nav { gap: 6px 13px; }
  .site-nav a { font-size: 14px; }
}
@media (max-width: 350px) {
  .site-nav { gap: 6px 9px; }
  .site-nav a { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
