/* Villa Themistokli — Coming soon
   Thesis: a postcard from the garden. Aged paper, letterpress ink,
   one deckle-edged print, and the blue of the pergola ironwork. */

:root {
  --paper: #eee6d4;          /* aged paper */
  --ink: #2a221b;            /* sepia-black letterpress ink */
  --muted: #65584a;          /* faded ink, 5.3:1 on paper */
  --accent: #2c4a8a;         /* blue of the garden ironwork */
  --print: #f7f1e3;          /* photographic paper */
  --line: rgba(42, 34, 27, 0.2);
  --print-shadow: drop-shadow(0 1px 1px rgba(42, 34, 27, 0.18)) drop-shadow(0 18px 24px rgba(42, 34, 27, 0.18));
  --grain-opacity: 0.5;

  --serif: "IM Fell English", "Iowan Old Style", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17140f;
    --ink: #ece3d0;
    --muted: #b3a690;
    --accent: #a9bde9;
    --print: #e4dcc9;        /* the print stays paper, just in lamplight */
    --line: rgba(236, 227, 208, 0.18);
    --print-shadow: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.6));
    --grain-opacity: 0.35;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* paper fibre: fine procedural noise, multiplied into the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  body::before { mix-blend-mode: screen; filter: invert(1); }
}

/* ---------- layout ---------- */

.page {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 4rem) 2rem;
  display: grid;
  grid-template-areas:
    "head"
    "print"
    "note";
  row-gap: clamp(2.5rem, 7vw, 3.5rem);
}

@media (min-width: 900px) {
  .page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "head print"
      "note print";
    column-gap: clamp(3rem, 7vw, 7rem);
    row-gap: 2.75rem;
    align-items: start;
  }
}

.masthead { grid-area: head; }
.print    { grid-area: print; }
.note     { grid-area: note; max-width: 32rem; }

/* ---------- masthead ---------- */

.place,
.trade,
.contact a,
.foot {
  font-family: var(--sans);
}

.place {
  margin: 0 0 1.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.name {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3.4rem, 9.5vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.005em;
}

.name span { display: block; padding-left: 0.55em; }

.trade {
  margin: 1.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- the print ---------- */

.print {
  margin: 0;
  width: 100%;
  max-width: 540px;
  justify-self: center;
  filter: var(--print-shadow);
}

@media (min-width: 900px) {
  .print { justify-self: end; margin-top: 1.25rem; }
}

/* deckle edge: an outer ring of tiny scallops (width --r) around a solid
   centre; the photo sits inside with a paper mat of width --mat */
.print-paper {
  --r: 3px;
  --mat: clamp(0.6rem, 1.8vw, 0.95rem);
  padding: var(--r);
  background: var(--print);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    radial-gradient(circle closest-side, #000 96%, #0000) 0 0 / calc(var(--r) * 2) calc(var(--r) * 2) round border-box;
  mask:
    linear-gradient(#000 0 0) content-box,
    radial-gradient(circle closest-side, #000 96%, #0000) 0 0 / calc(var(--r) * 2) calc(var(--r) * 2) round border-box;
}

.print-paper img {
  display: block;
  width: calc(100% - 2 * var(--mat));
  height: auto;
  margin: var(--mat);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

figcaption {
  margin-top: 1rem;
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- the note ---------- */

.soon {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.5rem);
  line-height: 1.05;
  color: var(--accent);
}

.soon span {
  display: block;
  margin-top: 0.35rem;
  font-style: italic;
  font-size: 0.55em;
  color: var(--muted);
}

.lede {
  margin: 1.75rem 0 0;
  font-size: 1.25rem;
  line-height: 1.5;
}

.lede-en {
  margin-top: 0.75rem;
  font-style: italic;
  font-size: 1.125rem;
  color: var(--muted);
}

/* ---------- contact ---------- */

.contact {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.75rem;
}

.contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.contact a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* the one action a visitor needs: find the gate */
.contact a.primary {
  color: var(--accent);
  font-weight: 500;
  text-decoration-color: currentColor;
}

.contact a.primary::after {
  content: "→";
  font-family: var(--sans);
  transition: transform 0.2s var(--ease);
}

.contact a.primary:hover::after { transform: translateX(3px); }

.contact .en { font-weight: 400; color: var(--muted); }

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

/* ---------- footer ---------- */

.foot {
  padding: 1.5rem clamp(1.25rem, 5vw, 4rem) 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

.foot p { margin: 0; }

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

/* ---------- arrival: the print develops, then and now ---------- */

@media (prefers-reduced-motion: no-preference) {
  .masthead { animation: arrive 0.9s var(--ease) both; }
  .print    { animation: arrive 1.1s var(--ease) 0.15s both; }
  .print img { animation: develop 2.6s var(--ease) 0.35s both; }
  .note     { animation: arrive 0.9s var(--ease) 0.6s both; }
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@keyframes develop {
  from { filter: sepia(0.9) saturate(0.5) contrast(0.85) brightness(1.12); }
  to   { filter: none; }
}
