@import url(fonts/fonts.css);
/* Shared by index.html and project.html. Tokens from the Villa Tria page, palette B2 Cycladic. */
:root {
  --bg: #fdfdfc;
  --tint: #f3f5f7;
  --text: #14213a;
  --dark: #0f2347;
  --accent: #0d5eaf;
  --text-soft: #515a6c;
  --rule: #ced1d5;
  --dark-soft: #d7dadf;
  --dark-rule: #485772;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1180px;
  --section: clamp(56px, 9vw, 120px);
  --fs-body: 1.0625rem;
  --fs-label: 0.75rem;
  --fs-section: clamp(2.6rem, 3vw, 2.75rem); /* intro headline and portfolio heading share this */
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-body)/1.65 var(--sans); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.label { font-size: var(--fs-label); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-soft); }
h1, h2 { text-wrap: balance; font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -.005em; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text-soft); max-width: 34em; text-wrap: pretty; }
h2 + p { margin-top: 24px; }

/* masthead, set over the hero photograph */
.masthead { position: absolute; top: 0; left: 0; right: 0; z-index: 2; padding: clamp(18px, 3vw, 30px) var(--gutter) 0; text-align: center; color: var(--bg); }
.masthead .the { display: block; font: 500 .7rem/1 var(--sans); letter-spacing: .5em; text-indent: .5em; text-transform: uppercase; margin-bottom: 6px; }
.masthead .name { display: block; font: 500 clamp(1.15rem, 3.4vw, 2rem)/1.2 var(--serif); letter-spacing: .1em; text-transform: uppercase; }
.masthead .where { display: block; margin-top: 8px; font: 500 .62rem/1.4 var(--sans); letter-spacing: .4em; text-indent: .4em; text-transform: uppercase; }
.masthead a { text-decoration: none; }

/* hero */
.hero-media { position: relative; }
.hero img { width: 100%; height: min(78svh, 112vw); min-height: 380px; max-height: 760px; object-fit: cover; object-position: 50% 50%; }
.hero-text { padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(32px, 5vw, 56px); display: grid; gap: 18px; }
.hero-text h1 { max-width: 15em; }
.hero-text .label { color: var(--accent); }

/* cover: the house photograph with the quote, first screen of home. S1 masthead sits on it. */
.cover { position: relative; display: grid; align-items: center; min-height: 66.67svh; color: var(--bg); background: var(--dark) url(img/quote-house.jpg) 38% 50% / cover no-repeat; }
.cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(15,35,71,.8), rgba(15,35,71,.62) 35%, rgba(15,35,71,.66)); }
.cover .wrap { position: relative; width: 100%; padding-top: clamp(40px, 7svh, 72px); padding-bottom: clamp(40px, 7svh, 72px); }
.cover .mark { margin-bottom: clamp(28px, 5.5svh, 56px); text-align: center; }
.cover blockquote { font: italic 500 clamp(1.6rem, 4.2vw, 3.08rem)/1.2 var(--serif); max-width: min(100%, 17em); margin: 0 auto; text-align: center; text-wrap: balance; }
.cover cite { display: block; margin-top: clamp(18px, 3vw, 32px); font-style: normal; }
.cover cite .name { display: block; font: 500 1.35rem/1.1 var(--serif); }
.cover cite .role { display: block; margin-top: 6px; color: var(--dark-soft); }

/* intro: S2 opens it, S3 follows */
.intro { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(40px, 5vw, 72px); } /* equal top and bottom */ /* first section under the cover: tighter so the headline sits in the first screen */
.intro .wrap { display: grid; gap: 28px; }
.intro .kick { color: var(--accent); }
.intro h1 { margin-top: 14px; max-width: 12em; font-size: var(--fs-section); }
.intro .wrap > p { font-size: 1.15rem; line-height: 1.7; max-width: 26em; text-wrap: pretty; }

.tbc { font: 600 .68rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; background: #ffe98a; color: var(--text); padding: .3em .5em; border-radius: 2px; white-space: normal; }

/* options page */
.opts .wrap { max-width: 760px; }
.opts h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }
.opts h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-top: clamp(40px, 6vw, 64px); padding-top: 24px; border-top: 1px solid var(--rule); }
.opts .note { margin-top: 12px; font-size: .95rem; color: var(--text-soft); }
.opts .opt { margin-top: 18px; padding-left: 16px; border-left: 2px solid var(--rule); }
.opts .opt.rec { border-left-color: var(--accent); }
.opts .opt .label { display: block; margin-bottom: 6px; }
.opts .opt.rec .label { color: var(--accent); }
.opts .opt p + p, .opts blockquote { margin-top: 8px; }
.opts blockquote { font-style: italic; color: var(--text-soft); }
.opts ol { padding-left: 1.3em; display: grid; gap: 10px; margin-top: 18px; }
.opts li { padding-left: 4px; }
.copylink { color: var(--dark-soft); text-decoration: underline; text-underline-offset: .2em; }
.grid.even { grid-template-columns: 1fr; grid-auto-rows: auto; }
.grid.even figure { aspect-ratio: 16/10; }
.grid.even figure:first-child { grid-column: auto; grid-row: auto; }
@media (min-width: 760px) { .grid.even { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; } .grid.even figure:first-child { grid-column: auto; grid-row: auto; } }

/* portfolio */
.portfolio { background: var(--tint); }
.portfolio .head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); }
.portfolio .head h2 { max-width: 14em; font-size: var(--fs-section); }
.cards { display: grid; gap: clamp(20px, 3vw, 32px); }
.card { background: var(--bg); border: 1px solid var(--rule); text-decoration: none; display: grid; grid-template-rows: auto 1fr; }
.card .pic { overflow: hidden; background: var(--tint); }
.card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .5s ease; }
.card:hover img { transform: scale(1.03); }
.card .info { padding: 22px 22px 26px; display: grid; gap: 10px; align-content: start; }
.card h3 { font: 500 clamp(1.7rem, 3vw, 2.1rem)/1.1 var(--serif); }
.card .loc { color: var(--accent); }
.card .desc { font-size: .98rem; color: var(--text-soft); }
.card .status { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--rule); }
.card:focus-visible, .back:focus-visible, .pn a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* project page */
.title-block { padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(32px, 5vw, 56px); display: grid; gap: 14px; }
.title-block .label { color: var(--accent); }
.title-block .status { color: var(--text-soft); }
.villa .wrap { display: grid; gap: clamp(32px, 5vw, 56px); }
.villa .body { display: grid; gap: 20px; }
.villa .body p { font-size: clamp(1.1rem, 2vw, 1.25rem); max-width: 36em; }
.villa { padding: clamp(8px, 2vw, 24px) 0 var(--section); }
.facts { background: var(--tint); padding: 12px clamp(18px, 3vw, 32px); }
.facts dl { border-top: 1px solid var(--rule); }
.facts .row { display: grid; grid-template-columns: 7.2em 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: var(--fs-label); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft); padding-top: .35em; }
.facts dd { font-weight: 500; }
.gallery { padding-top: 0; padding-bottom: var(--section); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; grid-auto-rows: 42vw; }
.grid figure { overflow: hidden; background: var(--tint); }
.grid figure:first-child { grid-column: span 2; }
.grid img { width: 100%; height: 100%; object-fit: cover; }
.pn { border-top: 1px solid var(--rule); }
.pn .wrap { display: flex; justify-content: space-between; gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.pn a, .back { text-decoration: none; font-size: var(--fs-label); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft); }
.pn a:hover { color: var(--accent); }
.back { justify-self: start; margin-bottom: 8px; }

/* footer */
footer { background: var(--dark); color: var(--bg); padding: clamp(40px, 6vw, 64px) 0; }
footer .wrap { display: grid; grid-template-areas: "logo" "sign"; gap: 18px; }
footer .flogo { grid-area: logo; }
footer .sign { grid-area: sign; }
footer .sign { font: italic 500 clamp(1.1rem, 2.2vw, 1.4rem)/1.3 var(--serif); }

@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .intro .wrap { grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; }
  .villa .wrap { grid-template-columns: 1.5fr 1fr; align-items: start; gap: 72px; }
  .grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 17vw; }
  .grid figure:first-child { grid-column: span 2; grid-row: span 2; }
}
@media (min-width: 1200px) { .grid { grid-auto-rows: 200px; } }
@media (prefers-reduced-motion: reduce) { .card img { transition: none; } }
@media print { .hero-media::before { display: none; } }
.opts .plain { text-decoration: none; }
.opts h1 { margin-top: 16px; }
@media (min-width: 760px) { .grid.even3 figure:first-child { grid-column: span 2; aspect-ratio: 21/9; } }
.cover .logo { width: clamp(180px, 18vw, 250px); height: auto; margin: 0 auto; }
@media (min-width: 1024px) { .cover blockquote { font-size: clamp(2.1rem, 3vw, 2.7rem); } }
footer .sign span { display: inline-block; }

/* five cards: full-width rows on desktop, image and text alternating sides; single column on phone */
@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr; gap: clamp(32px, 4vw, 56px); }
  .card { grid-template-columns: 1.6fr 1fr; grid-template-rows: auto; }
  .card:nth-child(even) { grid-template-columns: 1fr 1.6fr; }
  .card:nth-child(even) .pic { order: 2; }
  .card .info { align-content: center; padding: clamp(24px, 4vw, 56px); gap: 14px; }
  .card h3 { font-size: clamp(1.9rem, 3.2vw, 2.75rem); }
  .card .desc { font-size: 1.05rem; max-width: 22em; }
}
/* intro: two paragraphs in one column, centred against the headline block */
.intro .text { display: grid; gap: 1.1em; }
.intro .text p { font-size: 1.15rem; line-height: 1.7; max-width: 26em; text-wrap: pretty; }

/* wide gallery images, stacked, same 2:1 ratio */
.grid.stack { grid-template-columns: 1fr; grid-auto-rows: auto; }
.grid.stack figure, .grid.stack figure:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 2/1; }

/* lightbox (assets/lightbox.js), project pages */
.lb-trigger { cursor: zoom-in; }
.lb-trigger:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(15, 35, 71, .97); }
.lb[hidden] { display: none; }
.lb-img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; object-fit: contain; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; background: none; color: var(--bg); font: 300 2.4rem/1 var(--sans); cursor: pointer; }
.lb-btn:hover { color: var(--dark-soft); }
.lb-btn:focus-visible { outline: 2px solid var(--bg); outline-offset: -4px; }
.lb-close { top: 12px; right: 12px; font-size: 2.2rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }

/* mosaic gallery (Villas Ion): w full width, h half, p portrait + f its landscape partner at equal height. Crops on display only. */
.mosaic { display: grid; grid-template-columns: 1fr; gap: 8px; }
.mosaic figure { overflow: hidden; background: var(--tint); aspect-ratio: 3/2; }
.mosaic figure.p { aspect-ratio: 3/4; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 760px) {
  .mosaic { grid-template-columns: repeat(6, 1fr); }
  .mosaic .w { grid-column: span 6; aspect-ratio: 2/1; }
  .mosaic .h { grid-column: span 3; }
  .mosaic .p { grid-column: span 2; }
  .mosaic .f { grid-column: span 4; aspect-ratio: auto; }
}
.mosaic .top img { object-position: 50% 0; }
.hero img.ion-hero { object-position: 55% 12%; }
footer .flogo { width: clamp(110px, 10vw, 136px); height: auto; margin-bottom: 14px; }

/* footer, desktop: logo left, tagline right, centred against each other */
@media (min-width: 768px) {
  footer { padding: clamp(36px, 3.8vw, 52px) 0; }
  footer .wrap { grid-template-columns: 1fr auto; grid-template-areas: "logo sign"; column-gap: 40px; align-items: center; }
  footer .flogo { margin-bottom: 0; }
  footer .sign { text-align: right; }
}

/* portfolio, desktop: the break after the intro is one deliberate gap, not two stacked paddings */
@media (min-width: 1024px) { .portfolio { padding-top: 40px; } }

/* phone: lift the logo clear of the roofline, quote block unchanged (padding comes off the top, goes onto the logo-to-quote gap) */
@media (max-width: 767.98px) {
  .cover .wrap { padding-top: calc(clamp(40px, 7svh, 72px) - 3.6svh); }
  .cover .mark { margin-bottom: calc(clamp(28px, 5.5svh, 56px) + 3.6svh); }
}
