/* sammaproductions.com: the parts only the studio has. Everything else comes from samma.css. */

/* hero: the fleet climbs the right of the frame, so the words sit bottom left */

/* one left edge: nav, heads, media and lists all start on the wide column */
.studio ::selection { background: var(--link-light); color: #fff; } /* the studio's mark is black and white now, so no purple */
.studio .nav-brand img { height: clamp(13px, 6.57vw - 7.9px, 20px); } /* the whole name stays on one line, down to a 320 px phone */
.studio .section-head, .studio .wrap { width: var(--w-wide); }
.studio .section-head .t-intro { max-width: 60ch; }
.studio .nav-links a, .studio .lang-menu, .studio .button--small { font-size: 14px; }
.hero-copy--left { text-align: left; padding: 0 calc((100vw - var(--w-wide)) / 2); }
.hero-copy--left .t-intro { margin-left: 0; max-width: 60ch; }
.hero-copy--left .actions { justify-content: flex-start; }
.hero-copy--left .t-hero { text-shadow: 0 1px 28px rgb(0 0 0 / 0.45); } /* the boats pass behind the headline */
.studio .hero::after { background: linear-gradient(to top, rgb(0 0 0 / 0.82) 0%, rgb(0 0 0 / 0.58) 34%, rgb(0 0 0 / 0.28) 50%, rgb(0 0 0 / 0) 68%), linear-gradient(to right, rgb(0 0 0 / 0.45) 0%, rgb(0 0 0 / 0) 55%); }

@media (max-width: 734px) {
  .studio .hero { min-height: 500px; }
  /* one line, set low, shaded only as high as the words: the boats are the first screen */
  .studio .hero::after { background: linear-gradient(to top, rgb(0 0 0 / 0.88) 0%, rgb(0 0 0 / 0.62) 30%, rgb(0 0 0 / 0.25) 44%, rgb(0 0 0 / 0) 62%); }
  .hero-copy--left { bottom: 20px; padding: 0 var(--gutter); }
  .hero-copy--left .t-intro { margin-top: 10px; font-size: 17px; line-height: 1.35; }
  .hero-intro-more { display: none; }
  /* stacked at every phone width: beside the button the link runs into the pause control */
  .hero-copy--left .actions { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 18px; }
  .studio .mail { font-size: 5.5vw; white-space: nowrap; }
  .studio .mail wbr { display: none; } /* browsers still break at a wbr inside nowrap */
}

/* who you work with: a small photo and a few lines, after the visitor has seen what they get */
.about { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.about-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-lg); background: var(--tile); }
.about-copy .t-intro { margin-top: 18px; max-width: 54ch; }

.nav-brand, .nav-brand img { flex: none; }
.lang-menu { position: relative; flex: none; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 3px 6px; border-radius: 6px; color: #d2d2d7; cursor: pointer; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary { position: relative; }
.lang-menu summary::after { content: ""; position: absolute; inset: -8px -1px; } /* 44 px to tap */
.lang-menu summary:hover, .lang-menu[open] summary { color: #fff; }
.lang-menu svg { width: 10px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s var(--ease); }
.lang-menu[open] svg { transform: rotate(180deg); }
.lang-full { display: none; }
.lang-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 140px; padding: 6px; display: grid; border-radius: var(--r-sm); background: rgb(28 28 30 / 0.97); z-index: 20; }
.lang-panel a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 6px; color: #d2d2d7; }
.lang-panel a:hover { color: #fff; background: rgb(255 255 255 / 0.08); text-decoration: none; }
.lang-panel a[aria-current="true"] { color: #fff; font-weight: 600; }
.footer .lang-menu summary { padding-left: 0; color: #424245; font-size: 14px; }
.footer .lang-menu summary:hover, .footer .lang-menu[open] summary { color: var(--ink); }
.footer .lang-short { display: none; }
.footer .lang-full { display: inline; }
.footer .lang-panel { top: auto; bottom: calc(100% + 6px); background: #fff; box-shadow: 0 2px 16px rgb(0 0 0 / 0.16); }
.footer .lang-panel a { color: #424245; font-size: 14px; }
.footer .lang-panel a:hover { color: var(--ink); background: rgb(0 0 0 / 0.05); }
.footer .lang-panel a[aria-current="true"] { color: var(--ink); }
.nav-menu-panel .lang-menu { display: none; }

/* footer: one line */
.legal { width: min(680px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(48px, 7vw, 88px) 0; }
.legal .t-intro { margin-top: 20px; }
.legal h2 { margin: 36px 0 8px; font-size: 21px; line-height: 1.2; font-weight: 600; }
.legal p { margin: 0; color: var(--fg-2); }
.legal .t-caption { margin-top: 40px; }
.privacy .nav-inner > .lang-menu { display: block; } /* this page has no menu, so the language switch stays out */
.legal .mail { display: inline; margin: 0; font-size: inherit; line-height: inherit; font-weight: 400; letter-spacing: inherit; color: var(--link); }
.legal p:has(.mail) { margin-top: 8px; }
.footer-links { display: flex; gap: 16px; }

@media (max-width: 734px) {
  .about { grid-template-columns: 1fr; }
  .about-photo { aspect-ratio: 3 / 2; object-position: 50% 10%; }
}

/* the excerpt plays in a smaller window over the dimmed page */
.studio .reel-dialog { width: min(800px, calc(100vw - 32px), calc((100svh - 32px) * 16 / 9)); height: fit-content; margin: auto; overflow: hidden; border-radius: var(--r-lg); }
.studio .reel-dialog::backdrop { background: rgb(0 0 0 / 0.72); }
.studio .reel-dialog video { display: block; height: auto; aspect-ratio: 16 / 9; }
.studio .reel-close { top: 10px; right: 10px; }

.slider-dots { display: none; }
.studio .slider-dots .g-dot[aria-current="true"]::after { transform: none; }

/* without JS nothing moves, so no pause button */
html:not(.js) .motion-toggle { display: none; }
@media (pointer: coarse) { .studio .mail { min-height: 44px; display: inline-flex; align-items: center; } }
@media (max-width: 360px) { .hero .actions { padding-right: 56px; } }

/* contact form: posts to contact-worker through samma.js */
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; margin: clamp(28px, 3vw, 40px) 0; position: relative; }
.contact-form[hidden] { display: none; }
.contact-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.contact-form input, .contact-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; font-weight: 400; padding: 12px 14px; color: var(--ink); background: #fff; border: 1px solid rgb(0 0 0 / 0.18); border-radius: var(--r-sm); resize: vertical; }
.contact-form .form-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-wide { grid-column: 1 / -1; }
.form-hint { font-weight: 400; line-height: 1.4; color: var(--ink-2); }
.form-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-send .button:disabled { opacity: 0.5; }
.form-status { margin: 0; font-size: 17px; color: var(--ink); }
.form-status:focus { outline: none; box-shadow: none; }
.form-status[data-state="sending"] { color: var(--ink-2); }
.form-status[data-state="ok"], .form-status[data-state="err"] { font-weight: 600; }
.form-status[data-state="ok"]::before { content: "\2713\00A0"; }
.form-status[data-state="err"] { color: #d70015; }
.contact-form :user-invalid { border-color: #d70015; }
@media (max-width: 734px) { .contact-form { grid-template-columns: 1fr; } }
.contact-form .button { border: 0; cursor: pointer; }
.contact .mail { font-size: clamp(19px, 1.7vw, 21px); font-weight: 600; overflow-wrap: anywhere; }

/* selected work: a picture, a title, one line, one link */
.work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(24px, 3vw, 40px); }
.work-head .t-intro { margin-top: 14px; max-width: 54ch; }
.jobs { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(8px, 1vw, 14px); }
.job { position: relative; grid-column: span 4; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--tile); }
.job-media { position: relative; aspect-ratio: 4 / 5; background: #000; }
.job-media > video, .job-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* a title card in the MOSE gates' yellow: the film's best footage belongs to others */
/* who the work was for, in grey on the tile so it reads whatever the picture is */
.job-logos { display: flex; align-items: center; gap: 20px; min-height: 48px; margin-bottom: 22px; }
.job-logos img { display: block; opacity: 0.62; }
.job-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: clamp(14px, 1.6vw, 22px); }
.job h3 { margin: 0; font-size: clamp(22px, 2.8vw, 40px); font-weight: 600; line-height: 1.06; letter-spacing: -0.025em; }
.job p { margin: 0; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.42; color: var(--fg); }
.job .job-cat { margin: 6px 0 18px; font-size: clamp(14px, 1.1vw, 15px); font-weight: 400; line-height: 1.35; color: var(--fg-2); }
.job .more { margin-top: auto; padding-top: 20px; font-size: clamp(15px, 1.2vw, 17px); justify-self: start; }
.job .more::before { content: ""; position: absolute; inset: 0; } /* the whole card opens the example; its label says where */
.more-work { margin-top: clamp(16px, 2vw, 24px); font-size: 17px; line-height: 1.5; color: var(--fg-2); }
/* titles, offer lines, text and links line up across the three cards */
@media (min-width: 735px) {
  .jobs { grid-template-rows: auto auto auto auto 1fr auto; row-gap: 0; }
  .job { display: grid; grid-row: span 6; grid-template-rows: subgrid; }
  .job-body { display: grid; grid-row: 2 / span 5; grid-template-rows: subgrid; gap: 0; padding: clamp(14px, 1.8vw, 26px); }
}
/* what we do: three capabilities in the card the page already has; the middle one in black keeps the rhythm */
/* the three offers: type only, one row each */
/* the rows share one grid, so titles, lines and links stay in the same columns */
.offers { display: grid; grid-template-columns: 88px minmax(max-content, 5fr) minmax(0, 4fr) max-content; column-gap: clamp(16px, 3vw, 48px); }
.offer { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; gap: clamp(16px, 3vw, 48px); align-items: center; padding: clamp(22px, 2.6vw, 36px) 0; border-top: 1px solid rgb(0 0 0 / 0.16); }
.offer:last-child { border-bottom: 1px solid rgb(0 0 0 / 0.16); }
.offer-icon { display: block; width: 88px; height: 88px; color: var(--link-light); }
.offer h3 { margin: 0; font-size: clamp(24px, 2.5vw, 36px); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.offer p { margin: 0; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.38; color: var(--ink-2); text-wrap: pretty; }
.offer .more { justify-self: end; padding-block: 8px; margin-block: -8px; color: var(--link-light); white-space: nowrap; }
/* small tablets: the link sits under its line */
@media (min-width: 735px) and (max-width: 860px) {
  .offers { grid-template-columns: 88px max-content minmax(0, 1fr); }
  .offer { row-gap: 8px; }
  .offer-icon, .offer h3 { grid-row: span 2; }
  .offer .more { grid-column: 3; justify-self: start; }
}

/* contact: the form and one picture, so the enquiry point fills the width */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.contact-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-lg); background: var(--tile); }

/* about: three plain facts */
.facts { display: grid; gap: 8px; margin: clamp(20px, 2.4vw, 32px) 0 0; padding: 0; list-style: none; font-size: clamp(17px, 1.5vw, 19px); font-weight: 500; line-height: 1.3; }

@media (max-width: 1068px) and (min-width: 735px) {
}
@media (max-width: 734px) {
  .studio { --pad-section: 64px; }
  /* the two lead pieces run full width, the supporting ones sit in pairs */
  /* a row to slide sideways, as on apple.com; the next card peeks in */
  .jobs { display: flex; gap: 10px; width: 100%; max-width: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; padding-inline: calc((100vw - var(--w-wide)) / 2); scroll-padding-inline: calc((100vw - var(--w-wide)) / 2); }
  .jobs::-webkit-scrollbar { display: none; }
  .job { flex: 0 0 min(calc(100vw - 56px), 360px); scroll-snap-align: start; border-radius: var(--r-md); }
  /* a whole card, link included, fits between the menu and Safari's bar */
  .job-media { aspect-ratio: 16 / 10; }
  .slider-dots { display: flex; justify-content: center; height: 44px; margin-top: 8px; }
  .job-body { padding: 14px 16px 16px; gap: 0; }
  .job-logos { min-height: 34px; margin-bottom: 10px; gap: 14px; }
  .job-logos img { zoom: 0.72; }
  .job h3 { font-size: 23px; line-height: 1.08; letter-spacing: -0.02em; }
  .job p { font-size: 14.5px; line-height: 1.36; }
  .job .job-cat { margin: 4px 0 10px; font-size: 13.5px; }
  .job .more { padding-top: 10px; font-size: 15px; line-height: 1.38; }
  .more-work { font-size: 16px; }
  .offers { display: block; }
  .offer { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .offer-icon { width: 64px; height: 64px; margin-bottom: 4px; }
  .offer .more { justify-self: start; margin-top: 0; }
  /* the words run the full width; the pause control sits beside the title */
  .work-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .work-head > div { display: contents; }
  .work-head .t-intro { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-photo { display: none; }
}
@media (max-width: 480px) {
  /* no room for the language switch next to the full name: it moves into the menu */
  .nav-inner > .lang-menu { display: none; }
  .footer .lang-panel { right: auto; left: 0; }
  .footer-links { flex-wrap: wrap; }
  .nav-menu-panel .lang-menu { display: block; margin-top: 4px; border-top: 1px solid rgb(255 255 255 / 0.12); padding-top: 4px; }
  .nav-menu-panel .lang-menu summary { display: flex; justify-content: space-between; min-height: 44px; padding: 12px 14px; font-size: 17px; color: var(--fg); }
  .nav-menu-panel .lang-short { display: none; }
  .nav-menu-panel .lang-full { display: inline; }
  .nav-menu-panel .lang-panel { position: static; min-width: 0; padding: 0; background: none; }
  .nav-menu-panel .lang-panel a { padding-left: 26px; }
}
@media (max-width: 734px) { .studio .t-hero { font-size: clamp(30px, 8.8vw, 44px); } } /* the two lines stay two lines */

/* logos: one colour and grey, so no brand outshouts the work; samma.js doubles the row to make it loop */
.logos { padding: clamp(28px, 4vw, 48px) 0 0; background: #000; }
.logos-label { margin-bottom: clamp(16px, 2vw, 24px); font-size: 14px; color: var(--fg-2); }
.logos-clip { overflow: hidden; }
.logos-clip:has(.moving) { mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.logos-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px clamp(40px, 5vw, 72px); margin: 0; padding: 0; list-style: none; }
.logos-row img { display: block; opacity: 0.55; }
.logos-row img[src*="tor-vergata"] { opacity: 0.8; } /* thin serif letters vanish at the row's grey */
.logos-row img[src*="tu-delft"] { translate: 0 -5px; } /* its flame is light and its name heavy, so the box centre reads low */
.logos-window.moving { display: flex; width: max-content; animation: logos-slide 60s linear infinite; }
.logos-window.moving .logos-row { flex: none; flex-wrap: nowrap; padding-right: clamp(40px, 5vw, 72px); }
.logos:hover .moving, .motion-paused .moving { animation-play-state: paused; }
@keyframes logos-slide { to { transform: translateX(-50%); } }
