/* thomas-haase.ch: "Ridge". Landscape first, Farm21 deep teal below, condensed Archivo for display. Single dark look by design. */

@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-stretch: 62% 125%; font-display: swap;
  src: url(fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-stretch: 62% 125%; font-display: swap;
  src: url(fonts/archivo-latinext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --deep:   #06292d;   /* Farm21 teal, darkened: page ground */
  --deeper: #041d20;   /* note cards, image wells */
  --brand:  #00464f;   /* Farm21 brand teal: logo tile */
  --mist:   #e8efed;   /* primary text */
  --sage:   #9db5b0;   /* secondary text */
  --line:   rgba(232, 239, 237, 0.14);
  --ember:  #ef8800;   /* Farm21 orange: play buttons, link underline */

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --width: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--deep); color: var(--mist); font: 400 17px/1.6 var(--font); font-stretch: 100%; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
svg { width: 1em; height: 1em; flex: none; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 88vh; min-height: 88svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--deeper); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4, 29, 32, 0.05) 25%, rgba(4, 29, 32, 0.55) 62%, var(--deep) 100%); }
.hero-in { position: relative; z-index: 1; width: 100%; max-width: var(--width); margin: 0 auto; padding: 0 24px 56px; }
.id { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.85); flex: none; }
.name { margin: 0; font-weight: 800; font-stretch: 62%; text-transform: uppercase; font-size: clamp(44px, 6vw, 72px); line-height: 0.95; letter-spacing: 0; white-space: nowrap; }
.statement { max-width: 24em; margin: 24px 0 28px; font-size: clamp(20px, 2.3vw, 27px); line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; text-wrap: pretty; }
.statement a { text-decoration: none; background: linear-gradient(var(--ember), var(--ember)) 0 100% / 100% 2px no-repeat; padding-bottom: 1px; transition: background-size .25s ease; }
.statement a:hover { background-size: 100% 100%; }
.icons { display: flex; flex-wrap: wrap; gap: 10px; }
.icons a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 17px; color: #fff; transition: background .2s ease; }
.icons a:hover { background: var(--ember); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--width); margin: 0 auto; padding: 0 24px; }
section { padding-top: 72px; }
h2 { margin: 0 0 28px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; font-size: clamp(36px, 5vw, 54px); line-height: 1; letter-spacing: 0.005em; text-wrap: balance; }
h3 { margin: 0; font-size: 17px; font-weight: 600; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 28px; }
.sec-head h2 { margin: 0; }
.more { color: var(--sage); font-size: 15px; text-decoration: none; }
.more:hover { color: #fff; }

/* ---------- Projects ---------- */
.projects { display: grid; gap: 18px; }
.proj { position: relative; display: block; aspect-ratio: 4 / 5; max-width: 100%; overflow: hidden; border-radius: 6px; text-decoration: none; background: var(--deeper); }
.proj > img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.proj:hover > img { transform: scale(1.04); }
.proj.is-logo { background: var(--brand); display: grid; place-items: start center; padding-top: 22%; }
.proj.is-logo > img { width: 58%; height: auto; }
.proj .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 72px 22px 20px; background: linear-gradient(transparent, rgba(4, 29, 32, 0.9)); }
.proj .cap b { display: block; font-weight: 700; font-stretch: 75%; text-transform: uppercase; font-size: 30px; line-height: 1; color: #fff; }
.proj .cap span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--mist); max-width: 32em; }
.proj .cap em { display: inline-block; margin-top: 10px; font-style: normal; font-size: 14px; color: var(--sage); border-bottom: 1px solid var(--ember); }

/* ---------- Farm21: Instagram + socials ---------- */
.mini { display: flex; gap: 8px; }
.mini a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--sage); font-size: 15px; transition: color .2s ease, border-color .2s ease; }
.mini a:hover { color: #fff; border-color: var(--ember); }
.insta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 6px; overflow: hidden; }
.insta-item { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--deeper); }
.insta-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.insta-item:hover img { opacity: .85; }
.insta-badge { position: absolute; top: 8px; right: 8px; color: #fff; font-size: 16px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }

/* ---------- Video strips ---------- */
.strip { margin-top: 44px; }
section > .strip:first-of-type, h2 + .strip { margin-top: 0; }
.strip .block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.vid-nav { display: flex; align-items: center; gap: 8px; }
.vid-nav .more { margin-right: 6px; display: none; }
.nav-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--mist); font-size: 15px; cursor: pointer; transition: border-color .2s ease, opacity .2s ease; }
.nav-btn:hover:not(:disabled) { border-color: var(--ember); }
.nav-btn:disabled { opacity: .3; cursor: default; }
.nav-btn[hidden] { display: none; }
.vids { display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.vids::-webkit-scrollbar { display: none; }
.vid { scroll-snap-align: start; min-width: 0; }
.vid-media { position: relative; display: block; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 6px; overflow: hidden; background: #000; }
.vid-media img { width: 100%; height: 100%; object-fit: cover; }
.vid-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--ember); color: #fff; font-size: 20px; transition: transform .2s ease; }
.play svg { margin-left: 2px; }
.vid-media:hover .play { transform: translate(-50%, -50%) scale(1.08); }
.vid-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; font-size: 15px; line-height: 1.4; color: var(--sage); }

/* ---------- Nostr notes ---------- */
.notes { display: grid; gap: 14px; }
.notes-status { margin: 0; color: var(--sage); }
.note { background: var(--deeper); border-radius: 6px; padding: 22px 24px; }
.note-text { margin: 0; font-size: 17px; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.note-text a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.note-img { margin-top: 14px; width: 100%; max-height: 320px; object-fit: cover; border-radius: 4px; }
.note-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 14px; font-size: 14px; color: var(--sage); }
.note-foot a { color: var(--sage); }
.note-foot a:hover { color: #fff; }
.note-foot .chip { color: var(--ember); text-decoration: none; }
.note-foot .open { margin-left: auto; }

/* ---------- Footer ---------- */
.foot { margin-top: 96px; padding: 28px 0 48px; border-top: 1px solid var(--line); color: var(--sage); font-size: 14px; }

/* ---------- Larger screens ---------- */
@media (min-width: 560px) {
  .id { flex-direction: row; align-items: center; gap: 22px; }
  .avatar { width: 108px; height: 108px; }
  .vid-nav .more { display: inline; }
  .vids { grid-auto-columns: calc((100% - 16px) / 1.6); }
}
@media (min-width: 768px) {
  section { padding-top: 96px; }
  .projects { grid-template-columns: 1fr 1fr; }
  .proj { aspect-ratio: 4 / 3; }
  .proj.is-logo { padding-top: 13%; }
  .proj.is-logo > img { width: 46%; }
  .insta { grid-template-columns: repeat(6, 1fr); }
  .vids { grid-auto-columns: calc((100% - 32px) / 3); }
}

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